Learning AngularJS and local storage - web