Last active
November 11, 2017 23:07
-
-
Save dalabord/27a44d87b3e74134e10b32f0e2b60654 to your computer and use it in GitHub Desktop.
Cycle de vie du composant Angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cycle de vie du composant sans précision des implementations | |
*/ | |
@Component({ | |
selector: 'adq-lifecycle', | |
template: '<div adq-directive></div>', | |
}) | |
class Lifecycle { | |
ngOnInit() {} // Résolution des propriétés, 'adq-directive' traité | |
ngOnDestroy() {} // Dernier traitement avant suppression du composant | |
ngDoCheck() {} // Lors de la détéction des modifications par le framework | |
ngOnChanges(changes) {} // Après ngDoCheck si changement(s) identifié(s) | |
ngAfterContentInit() {} // Après résolution des ng-content | |
ngAfterContentChecked() {} // A la détéction des modifications d'ng-content | |
ngAfterViewInit() {} // Après résolution de la vue du composant et des vues enfants | |
ngAfterViewChecked() {} // // A la détéction des modifications dans la vue | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment