Angular and $cookies - $cookies.get is not a function

后端 未结 3 1381
独厮守ぢ
独厮守ぢ 2020-12-15 03:20

I\'m trying to use cookies within Angular - here\'s what I\'m trying:



        
3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 03:54

    In Angular 1.3.14 you can just use

    var favoriteCookie = $cookies[user_id];
    

    See the documentaiton here: Angular Cookies

提交回复
热议问题