fix(ivy): init hooks should be called once and only once (#28239)

PR Close #28239
This commit is contained in:
Marc Laval
2019-01-18 17:38:39 +01:00
committed by Jason Aden
parent 873750609f
commit d83307adab
9 changed files with 233 additions and 184 deletions

View File

@ -256,6 +256,7 @@ export function defineComponent<T>(componentDefinition: {
inputs: null !, // assigned in noSideEffects
outputs: null !, // assigned in noSideEffects
exportAs: componentDefinition.exportAs || null,
onChanges: null,
onInit: typePrototype.ngOnInit || null,
doCheck: typePrototype.ngDoCheck || null,
afterContentInit: typePrototype.ngAfterContentInit || null,