Storage.get() in method for [hidden] in template


#1

Hi,
I want to use storage.get() (according to http://ionicframework.com/docs/v2/storage/) for decide if some element should be hidden or visible.

HTML:
<span [hidden]='isLogged()'>{{"Customer.notLogged"|translate}}</span>

TS:

public isLogged(): boolean {
        console.log('call is logged');
        this.storage.get("Token").then((data)=>{
            console.log('loaded from storage');
        });
}

Google Chrome tab with app freezes after enter to view with HTML code above, trying to call isLogged() again and again with no result from storage. The Token is saved of course.

What is right access to local storage from template?