I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request
Current behavior
changing a component value in afterViewInit throws ExpressionChangedAfterItHasBeenCheckedError if the value has an impact on a method used in the view.
in the plunker:
-> getHeightPx() returns 0px before ngAfterViewInit is called (isLoaded === undefined)
-> getHeightPx() returns 100px after ngAfterViewInit is called (isLoaded === true)
Expected behavior
it should not throw the error since getHeightPx is just a method and not part of the model.
Minimal reproduction of the problem with instructions
http://plnkr.co/edit/JdhPkjBl6wc0FIc8LcUs?p=preview
- Angular version: 4.0.0-rc.0 => KO
- Angular version: 4.0.0-beta.8 => OK
I'm submitting a ...
Current behavior
changing a component value in afterViewInit throws
ExpressionChangedAfterItHasBeenCheckedErrorif the value has an impact on a method used in the view.in the plunker:
->
getHeightPx()returns0pxbefore ngAfterViewInit is called (isLoaded === undefined)->
getHeightPx()returns100pxafter ngAfterViewInit is called (isLoaded === true)Expected behavior
it should not throw the error since
getHeightPxis just a method and not part of the model.Minimal reproduction of the problem with instructions
http://plnkr.co/edit/JdhPkjBl6wc0FIc8LcUs?p=preview