Angular.js filters and functions on scope that is changing every second

折月煮酒 提交于 2019-12-02 07:41:28

You are asking quite a few questions in your question. It would be better to ask them each in separate SO questions.

Anytime an Angular digest cycle runs, all watches and filters will run. Changing things "inside" of Angualar will cause a digest cycle to run. How are you changing $scope.active_entry? If you can change it outside of Angular, you might be able to do what you want. As you mentioned, you'll also have to put that property into a new child scope (scope: true) or isolate scope (scope: {...}), then you could call $scope.digest() (after you change active_entry) to only digest that scope.

Creating a directive would be the best way to create an isolate scope. You can create a child scope with ng-controller or a directive.

See also https://groups.google.com/d/topic/angular/1XtEAX93ces/discussion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!