Ionic 2 rootScope variable


#1

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


#2

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


#3

dose the value update automatically when changed ?