Answer the question
In order to leave comments, you need to log in
How to run a directive in angular after receiving a value from the server?
Send to directive <div index index="vm.rating"></div>
Receive to directive
scope:{
index: '='
},
link: function(scope, element, attr) {
console.log(scope.index); //возвращает undefined, потому что запрос не успевает отработать
}
Answer the question
In order to leave comments, you need to log in
You cannot duplicate attributes. Remove one index.
<div index="vm.rating" ng-if="vm.look_Ma_Iam_Ready"></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question