AngularJS $watch newValue is undefined

后端 未结 2 1463
不思量自难忘°
不思量自难忘° 2021-01-07 11:53

I am trying to make a alert service with a directive. It is in the directive part I have some trouble. My have a directive that looks like this:

angular.modu         


        
2条回答
  •  感情败类
    2021-01-07 12:33

    if you have jQuery available, try this

    if(jQuery.isEmptyObject(newValue)){
          return;
    }
    

    inside scope.$watch

提交回复
热议问题