You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a working demo using BodyOutputType.Component with template bindings? Whenever I try to add bindings or interpolation to the template I get the following error.
Error: Expression has changed after it was checked. Previous value: 'CD_INIT_VALUE'. Current value: 'Some value loaded via component'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?
If you remove the "{{someValue}}" from the template, it will work fine. Any idea what might be wrong here? This used to work with versions prior to the official Angular2 release.
Thanks.
The text was updated successfully, but these errors were encountered:
This looks like this is caused by changes made post rc.5 that do not allow new model changes in ngAfterViewInit(), which is the hook used for dynamic rendering since it is not until that point that the new componentFactoryResolver can render the component.
This should be as simple as forcing change detection within the lifecycle hook. This was not properly covered by tests and as a result never showed up.
Thanks for bringing this up. This will be fixed soon.
Is there a working demo using BodyOutputType.Component with template bindings? Whenever I try to add bindings or interpolation to the template I get the following error.
Error: Expression has changed after it was checked. Previous value: 'CD_INIT_VALUE'. Current value: 'Some value loaded via component'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?
I have a modified version of your plunker demonstrating this issue here...
http://plnkr.co/edit/d8xggIUEQxtwzNrANlZh
If you remove the "{{someValue}}" from the template, it will work fine. Any idea what might be wrong here? This used to work with versions prior to the official Angular2 release.
Thanks.
The text was updated successfully, but these errors were encountered: