request| feat(NgModule): provide life cycle hooks #10244
Labels
area: core
Issues related to the framework runtime
core: NgModule
feature
Issue that requests a new feature
freq1: low
Milestone
With the introduction of
NgModule
to solve some problems of having to run code before bootstrap. I think it's better to provide lifecycle hooks for these modules for example theses would be great to havengBeforeLoad: before loading the module
ngAfterLoad: after the module is loaded
ngBeforeChangeDetection: do something before change detection happens for this module
ngAfterStable: do something after the zones are stable (a great use-case for this is prefetching async lazy routes after boot that doesn't affect the ui)
ngAfterStable is probably the best feature since universal and jasmine can use it
might also help with #9975
also see ng1
.config
and.run
angular/angular.js#4003The text was updated successfully, but these errors were encountered: