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

[angular] 7. 表达式 {{yourModel}} 是如何工作的? #531

Open
qiilee opened this issue Oct 15, 2019 · 0 comments
Open

[angular] 7. 表达式 {{yourModel}} 是如何工作的? #531

qiilee opened this issue Oct 15, 2019 · 0 comments
Labels

Comments

@qiilee
Copy link
Member

qiilee commented Oct 15, 2019

答案:

它依赖于 $interpolation服务,在初始化页面html后,它会找到这些表达式,并且进行标记,于是每遇见一个 {{}} ,则会设置一个 $watch 。而 $interpolation 会返回一个带有上下文参数的函数,最后该函数执行,则算是表达式 $parse 到那个作用域上。

@qiilee qiilee added the Angular label Oct 15, 2019
@qiilee qiilee added this to In progress in 每日一题认领区 Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant