Chuck Jazdzewski
24cf8b3269
fix(core): ensure init lifecycle events are called (#20258)
Throwing an exception in a lifecycle event will delay but not prevent an Init method, such as `ngOnInit`, `ngAfterContentInit`, or `ngAfterViewInit`, from being called. Also, calling `detectChanges()` in a way that causes duplicate change detection (such as a child component causing a parent to call `detectChanges()` on its own `ChangeDetectorRef`, will no longer prevent change `ngOnInit`, `ngAfterContentInit` and `ngAfterViewInit` from being called. With this change lifecycle methods are still not guarenteed to be called but the Init methods will be called if at least one change detection pass on its view is completed. Fixes: #17035 PR Close #20258
Safari (7+), iOS (7+) and IE mobile (11) are tested on BrowserStack.
Angular
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript and other languages.
Quickstart
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%