Solution 1 :

Try to use ng-if='true/false' do not use {{}} in directive

Problem :

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>


Comment posted by Lucas Mengual

Thanks! And how would I link the button object with the value from

Comment posted by Denis

may be