I have this in my app.html:

                <li class="active"><a [routerLink]="['/Report', {panel: 
'Patient'}]">Patient</a></li>
                <li><a [routerLink]="['/Report', {panel: 
'History'}]">History</a></li>
<li><a [routerLink]="['/EKGPage']">EKG</a></li>
                <li><a [routerLink]="['/Preview']">Preview</a></li>

In the Report page, if I console.log() output when the constructor is 
entered, and different output when ngOnInit() is entered, I see that both 
the constructor and ngOnInit() are both called for the first page that is 
loaded.

But, when the user clicks on a different tab, ONLY the constructor for that 
is loaded!

My code worked properly under Angular beta 1 (ngOnInit() was called every 
time a tab was clicked) but under beta 15 (yes I know this isn't current 
either...) only the constructor is called. 

Is this a bug, or was something changed in Angular related to ngOnInit() or 
routes?

-Vern


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to