I have a directive that defines a function innerBarStyle()at the link stage and associates it with a scope:
restrict : 'EA',
scope: {
values: '='
},
link: function(scope, elements, attributes){
scope.innerBarStyle = function(value){
console.count("innerBarStyleCounter");
return {
width: 10px;
};
}),
templateUrl: 'template.html'
};
The function does nothing but count the number of attempts to execute and return an object.
Now, in the template-template, I call this function with an expression. Sort of<div ... ng-style=innerBarStyle(someValueInCurrentScope)><div>
, , - , .
, , (, $http). . , - - ?
, , , , .