Questions tagged [angular-cookies]

118 questions
1
vote
0 answers

$Cookies not setting instant

I am stuck at hiding and showing login/logout buttons at navbar. I am setting some cookies at loginCtrl belongs to login.html. And getting those cookies in homeCtrl which belongs to home.html. Here is my code; .controller("loginCtrl",…
Nasuh
  • 355
  • 3
  • 20
1
vote
1 answer

AngularJs - $cookies reflecting changes only after refresh on same state

I am using $cookies to store userId upon successful login from a modalInstanceController and then getting the userId in my homepageController. In the whole process the state of the app is not being changed and neither the page is reloaded. Now when…
amanpurohit
  • 1,246
  • 11
  • 19
1
vote
1 answer

Angular $cookieStore not retaining updated cookie on refresh

I'm having issues with $cookieStore retaining a cookie value after updating it. Here are two methods of a UserService that deals with the cookie: var getCurrentUser = function () { return $cookieStore.get('currentUser'); }; var…
mellis481
  • 4,332
  • 12
  • 71
  • 118
1
vote
0 answers

sharing cookies across domain using ngCookies/$cookiestore

I want to use ngCookies so I can re-use the login cookies on another host under the same domain. This way, when I login on app1.example.com and I visit app2.example.com, I won't need to login anymore. It will use the cookies that was created in…
devwannabe
  • 3,160
  • 8
  • 42
  • 79
1
vote
0 answers

Angular Cookie Resets

I am creating car searching module using Angular + REST Api. I have read most of the articles here none of them had problem which i have come across; Angular Cookies works fine on localhost, when i uploaded it to server it's not working as it…
Sumeet Gohil
  • 181
  • 1
  • 10
1
vote
1 answer

Angular Cookies does not work

I'm using Angular v1.3.10 and i'm setting a cookie successfully. When i'm doing $cookieStore.put(key,value) and then $cookieStore.get(key) i see the object I added. When i'm refreshing the page and doing $cookieStore.get(key) i get undefined. Any…
Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154
1
vote
2 answers

Send a cookie in http requests from frontend to backend with Angular

I am developing a web-application using AngularJS. The application is realized with: a frontend, a component without logic, that simply queries a backend many times, in order to receive from it all the needed data; a backend, containing many…
user140888
  • 609
  • 1
  • 11
  • 31
1
vote
0 answers

How to set cookie in angularjs?

I am developing a simple web application using angularjs. The application logs in using Facebook connect and then lists data. I am able to login using Facebook but I don't know how to use $cookie for the web app and access that. Can anyone can…
1
vote
1 answer

angular $cookieStore not working under controller $scope functions

I am facing problem while using angular-js with $locationProvider.html5Mode(true).hashPrefix('!'); Everything Working fine with routing, expect $cookieStore not working under the functions defined in controller $scope, may be because of the…
macgadger
  • 11
  • 3
0
votes
0 answers

Practices for handling variables in angular

Until now the output from all inputs, access tokens for authentication and conditionals were saved in cookies in the project that I started working on, so that they are easily accessible at the end of the form to create a ticket. In theory this is a…
0
votes
1 answer

Setting cookie on an iframe website with ngx-cookie-service

When I embed a youtube video for example in my angular component:
I will get two entries in my Application/Storage/Cookies in Developer console: One…
cheshire
  • 1,109
  • 3
  • 15
  • 37
0
votes
0 answers

can't get key value from cookies though it was exist but invalid format

I am setting some key in $cookieStore like $cookieStore.put('temp',temp); and saved ok in cookies but some where some bites of key value are changed , so when $cookieStore.get('temp'); I get this error : Uncaught SyntaxError: Unexpected end of…
0
votes
0 answers

document.cookie or $cookies returning empty values intermittently in IE

In one of my applications observed that "document.cookie" or $cookies is returning empty values and i am unable to access cookies in code even though cookies are visible in the browser. Are there any issues that are already identified in IE browser.…
0
votes
0 answers

Angular2: Login with api fails to get data sometimes

I'm trying to login on web with authentication of token got from Web-API. I am saving the token in cookies and proceed my work. I want to ask that if i am login with admin on one tab and without logout, i will login again. Then, sometimes the…
0
votes
0 answers

Read cookie in AngularJs, REST API

So, I created my client application using angular to interact with my WCF REST API. I basically use cookies to store the login session and retrieve the information by sessions. This works perfectly from Postman and also with a console client…