mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
test(angular): add tests for ngOnInit
This commit is contained in:

committed by
Manu MA

parent
c8d9685bc9
commit
7698c31790
@ -19,11 +19,11 @@ export class StackController {
|
||||
private zone: NgZone,
|
||||
) {}
|
||||
|
||||
createView(enteringRef: ComponentRef<any>, route: ActivatedRoute): RouteView {
|
||||
createView(enteringRef: ComponentRef<any>, activatedRoute: ActivatedRoute): RouteView {
|
||||
return {
|
||||
ref: enteringRef,
|
||||
element: (enteringRef && enteringRef.location && enteringRef.location.nativeElement) as HTMLElement,
|
||||
url: this.getUrl(route)
|
||||
url: this.getUrl(activatedRoute)
|
||||
};
|
||||
}
|
||||
|
||||
@ -134,6 +134,7 @@ export class StackController {
|
||||
}
|
||||
if (enteringView) {
|
||||
enteringView.ref.changeDetectorRef.reattach();
|
||||
enteringView.ref.changeDetectorRef.markForCheck();
|
||||
}
|
||||
const enteringEl = enteringView ? enteringView.element : undefined;
|
||||
const leavingEl = leavingView ? leavingView.element : undefined;
|
||||
|
Reference in New Issue
Block a user