Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #cookies
  2.  
  3. 1. add 'ngCookies' to app.module
  4. 2. inject $cookieStore into Controller
  5.  
  6. # Put cookie
  7. $cookieStore.put('myFavorite','oatmeal');
  8.  
  9. # assign cookie to a scope variable to witness the sticky.
  10. # not very secure, but great way to retain vital info between page refereshes
  11. $scope.favoriteCookie = $cookieStore.get('myFavorite');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement