Reputation: 415
I got an application which uses the 'oidc-client'
module, which redirects and if logged in properly in that website I return the value {{auth?.loggedIn}}
in my HTML. This value can either be true or false.
What I´m trying to do is to show a second button only when the value {{auth?.loggedIn}}
is true. And when the value is false. Been trying with the ng-hide method and then function to check, but doesn´t do anything.
Here´s my HTML part:
<button (click)="onLogin()" class="btn btn-lg btn-primary btn-block">SSO Login</button>
Currently Logged In? {{auth?.loggedIn}}
Logged in as: {{currentUser?.profile?.email}}
<button type="submit" class="btn btn-lg btn-primary" onclick="window.location.href='/secondpage'">Go to second page</button>
Upvotes: 1
Views: 193