Expression value to store in localstorage

Is there a way where I can store expression such as {{item.hello}} directly to a localstorage?

You can try :

To set item on local storage

window.localStorage.setItem('hello', 'Just say Hi! with a smile.');

To get item from local storage


If you want to use it in your html view you need to do :

In your controller (.js)

$scope.hello = window.localStorage.getItem('hello');

In your view (.html)