diff --git a/_goldens/test/_files/directives/directive_wrapper.dart b/_goldens/test/_files/directives/directive_wrapper.dart index bcb81f76e3..07a07e2319 100644 --- a/_goldens/test/_files/directives/directive_wrapper.dart +++ b/_goldens/test/_files/directives/directive_wrapper.dart @@ -5,10 +5,12 @@ import 'package:angular/angular.dart'; @Directive( selector: '[some-child-directive]', ) -class ChildDirective { +class ChildDirective implements OnInit, OnDestroy, AfterChanges { Element element; + // ignore: deprecated_member_use ElementRef elementRef; + ChildDirective(this.element, this.elementRef); StreamController _triggerController; @@ -53,6 +55,15 @@ class ChildDirective { @HostBinding('class.is-disabled') bool get disabled => false; + + @override + void ngOnInit() {} + + @override + void ngOnDestroy() {} + + @override + void ngAfterChanges() {} } @Directive( diff --git a/_goldens/test/_files/directives/directive_wrapper.template.golden b/_goldens/test/_files/directives/directive_wrapper.template.golden index 3d94687724..ab35340127 100644 --- a/_goldens/test/_files/directives/directive_wrapper.template.golden +++ b/_goldens/test/_files/directives/directive_wrapper.template.golden @@ -60,14 +60,29 @@ class ViewTestFooComponent0 extends AppView { @override void detectChangesInternal() { final _ctx = ctx; + bool changed = false; + bool firstCheck = (this.cdState == 0); + changed = false; final currVal_0 = _ctx.rowIndex; if (import11.checkBinding(_expr_0, currVal_0)) { _ChildDirective_0_5.instance.gridRow = currVal_0; + changed = true; _expr_0 = currVal_0; } + if (changed) { + _ChildDirective_0_5.instance.ngAfterChanges(); + } + if (((!import11.AppViewUtils.throwOnChanges) && firstCheck)) { + _ChildDirective_0_5.instance.ngOnInit(); + } _ChildDirective_0_5.detectHostChanges(this, _el_0); } + @override + void destroyInternal() { + _ChildDirective_0_5.instance.ngOnDestroy(); + } + @override void initComponentStyles() { var styles = _componentStyles;