Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cookies
- 1. add 'ngCookies' to app.module
- 2. inject $cookieStore into Controller
- # Put cookie
- $cookieStore.put('myFavorite','oatmeal');
- # assign cookie to a scope variable to witness the sticky.
- # not very secure, but great way to retain vital info between page refereshes
- $scope.favoriteCookie = $cookieStore.get('myFavorite');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement