E
E
Evgeny2017-09-04 19:02:47
Angular
Evgeny, 2017-09-04 19:02:47

How to properly use ngModel in your directives?

Hello.
I made a directive, it is called something like this , it declares a scope { ngModel: '=' } in the controller of the directive I assign values ​​to $ scope.ngModel , but they do not come immediately, but about once every 2-3 seconds. How to properly use ngModel in your directives?
<mydirective ng-model="value"></mydirective>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny, 2017-09-05
Lubyanoy @arswarog

so I just assign $scope.ngModel and call $scope.$apply()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question