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

创建动态组件后,调用componentRef.instance不能更新界面数据 #268

Open
coloz opened this issue Oct 24, 2017 · 1 comment
Open

Comments

@coloz
Copy link

coloz commented Oct 24, 2017

发现在动态组件创建后,使用动态组件的实例(componentRef.instance)去改变动态组件的属性,如:
componentRef.instance.xxx="123"
界面上的绑定的{{xxx}},不会更新
但控制台输出得知,其中的xxx确实已经变更。
而直接在动态组件类中使用函数,可以改变xxx,且{{xxx}}实时更新了。
这难道是发现angular的bug了?
如果才能让使用componentRef时,绑定的数据实时更新呢?

@JayzeeHuang
Copy link

JayzeeHuang commented Oct 28, 2017

用NGZONE @coloz

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

2 participants