Angularjs - watch all directive scope attributes? -


I have a "bar chart" instruction in angular, which I want to change many scope properties of one time < / P>

I am wondering what is the case with regard to the scope of my choice ...
As the render method is the only independent, the attribute has been changed, I ideally Want to see the scope for change - is this possible? I see either looking at a collection of options or a scope of all the properties. Looking at the object and looking at that object.

  angular.module ('chartPackage'). Directive ('Barchart', '[Function () {return {restrict:' E ', scope: {width:' = ', height:' = ', fontSize:' = ', Data:' = ', colorMap:' = ', OnClick:' = ', transit:' = ',}, link: function (scope, element, etter) {// How to view all attributes? Field. $ Watch (' ?????? ', Function (A, B) {Recker ();}  

You provided the watch expression

  scope. $ Watch (function (newview, oldview) {console.log (newValue.width);});  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -