Hi Sander,
Thanks for your help but after 3 days I'm still not catching something.
when I load the app.component.ts it loads the top-menu.component.ts pending
results of if(JSON.parse(localStorage.getItem('auth_token'))). this if
statement is inside top-menu.component.ts.
1. when it goes through the app.component.ts the top-menu.component.ts is
loaded.
2. in top-menu.component.ts i have testVar =
if(JSON.parse(localStorage.getItem('auth_token'))). if true display.
3. according to console.log testVar inside the top-menu.component remains
false and I'm assuming I completed the top-menu.component.ts and any thing
I do after not reflected back.
4. how can i have top-menu.component check after it has loaded if testVar =
if(JSON.parse(localStorage.getItem('auth_token'))) has changed?
On Wednesday, January 4, 2017 at 3:19:56 AM UTC-5, Sander Elias wrote:
>
> Hi Dawg,
>
> Move the menu outside of the primary router outlet. You can use a separate
> outlet, or hide it when not logged in.
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"Angular" 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.