Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果不显示设置监听器的话,ng又是如何判断的? #5

Open
tabyouto opened this issue Jun 11, 2017 · 0 comments
Open

Comments

@tabyouto
Copy link

文章中这句话

在作用域上添加数据本身并不会有性能折扣。如果没有监听器在监控某个属性,它在不在作用域上都无所谓。Angular并不会遍历作用域的属性,它遍历的是监听器。

如果正常设置了 10个 $scope.xxx 类似的属性,5个绑定在了input上,那么ng dirtycheck的时候会去遍历的吧,那另外5个属性是怎么判断不需要遍历呢?因为我都没有设置监听器。
还是说对于使用了ng-model的属性就会默认设置上监听器?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant