Ionic 2 rootScope variable

i need a variable like root scope in angular 1
For Example.
var isLogedIn=true
//some page
<span *ngIf=“isLogedIn” >hello
//in another Page
<span *ngIf="!isLogedIn" >Log in from here
and if i change the value it will automatically change the all bindings

You should create a provider using @Injectable to do that, then inject the provider wherever you want to access or change any values.

1 Like

dose the value update automatically when changed ?