Reputation: 632
I´m at that point on my app, where the user Logged in, receive the data from the server and now i need to make same changes. One of the changes is change the button that appears on my Sidedrawer saying Log In to Log Out and vice-versa when the user Logs Out...I could talk about other changes but i think the main thing is...
How do I access the Sidedrawer content in order to change/add buttons. I already entered the app-root.xml
and made same testing adding the navigatingTo="onNavigatingTo"
function and also in the .js file just to see if it responds, but it doesn´t...
How do i perform this?
Upvotes: 1
Views: 145
Reputation: 9670
You can show/hide your button via visibility, text binding or via a structural directive like *ngIf (if using Angular). For example, take a look here - I am showing/hiding a button based on whether the user is logged in or not (here is the related code-behind code).
The above example is using an Angular directive and can be applied only in Angular based applications, but with the same logic, you can substitute ****ngIf*** with visibility and achieve the same in TypeScript or plain JavaScript app.
Upvotes: 2
Reputation: 11
The easiest way to do it is put the frame inside drawer content area, then navigate frame to another page.
Upvotes: 1