I have the following BehaviorSubject in a service:
isAuthenticated = new BehaviorSubject(false);
And I am using it as follows
I thought of posting a solution using ng-if-else which is maybe even more intuitive in your particular case:
Logged in Log in
Alternatively you could puth both cases inside a ng-template:
ng-template:
Hope it is of any use to other people ending up here.