Thanks to visit codestin.com
Credit goes to bennadel.github.io

Encapsulating LocalStorage Access In AngularJS

You have {{ vm.friends.length }} friends!

Log out ( will kill local storage ).