Questions tagged [angular-cookies]
118 questions
0
votes
2 answers
share cookies between subdomains using express/angularjs
I've been trying to accomplish this task for quite some time but haven't got any breakthrough yet. I would be really thankful if anyone can help me out in this.
Current Situation:
I've two applications that I'm running in two sub-domains as…

Yash Kapila
- 261
- 7
- 17
0
votes
1 answer
angular passing $cookie to on click event in a directive
Using angular, I want to save the value of an input to a cookie using directive when clicking on save button.
Here is my code, I wasn't sure if I should use link function or controller directive, but anyway $cookie is of course unknown in the click…

Shilan
- 813
- 1
- 11
- 17
0
votes
0 answers
Angularjs Login Application with Cookies
I try to create a login app using Angularjs that storing information in $cookies. Once the user is logged in, they don't have to log in again:
This is login form:
0
votes
0 answers
Can not get response cookie from angular $http post using ionic
I am sending a post auth request from my localhost to a remote server to get response cookies returned by server(using ionic proxy to solve CORS). From chrome network inspector, I can see the response cookie has been returned from server. However, I…

eded
- 3,778
- 8
- 28
- 42
0
votes
0 answers
$cookieStore or $cookies is not saving $stateParams data
Below is my controller which I need to save $stateParams data in the $cookieStore or $cookie. Because when I refresh all the data in $stateParams is gone.
Below is how I did it. But it is not saving data. When I put a console.log all are becoming…

shamila
- 1,280
- 6
- 20
- 45
0
votes
2 answers
What would prevent AngularJS $cookies from writing a cookie?
I'm attempting to write a simple cookie using the AngularJS v1.5.x $cookies service. The dependencies are all correct, as I can read a cookie. However, neither write nor edit are working.
For example:
var blah =…

isherwood
- 58,414
- 16
- 114
- 157
0
votes
2 answers
How do I use ngCookies with AngularJS login controller?
I've used generator-angular-fullstack with a freshly made route client/app/login. It contains login.controller.js, login.html, login.js, login.controller.spec.js and login.scss. I've set up a sign-in API endpoint
I would like to save…

KDC
- 1,441
- 5
- 19
- 36
0
votes
1 answer
Unable to load ngCookies into Web Application
I am trying to implement a 'remember me' option on my login page and have ventured down the path of using ngCookies to store a local cookie to handle this. However, in trying to follow the instructions from angular documentation I am unable to get…

Riples
- 1,167
- 2
- 21
- 54
0
votes
2 answers
Token based Authentication with Angular
I want to authenticate users through api, when username and password is right it returns a token and store on local storage using ngStorage but I read some articles that it's not secure saving token on localStorage, and they made reference to…

user3055606
- 65
- 1
- 12
0
votes
1 answer
How to write the same getter and setter angular cookies for both Angular 1.3 and 1.4
I'm writing Javascript code using Angular cookies which I will be using in two applications, one of which uses Angular 1.4 so I can use the $cookies getter and setter objects. But in the second application I'm using version 1.3 where I cant use the…

rUI7999
- 129
- 1
- 3
- 20
0
votes
1 answer
Using ng-class based on ng-cookies stored data
I am trying to use ng-class based on condition inside a function but sometimes the toggle does not work. i used $scope.getBookmarkIcon function so that i can get ng-class selected with bookmarkIcon class even after the page refresh but it is not…

Md. Salahuddin
- 1,062
- 15
- 22
0
votes
1 answer
$cookies and hide element on login/logout and ui-router child states
I am stuck at hiding and showing the login and logout buttons at the navbar. I am setting some cookies at LoginCtrl which belongs to login.html. When user logged in I am assigning rootscope to some variables which that variable assing to ngshow/hide…

Nasuh
- 355
- 3
- 20
0
votes
0 answers
Cannot read localhost cookies (return undefined)
Trying to use ngCookies to read cookie.
There is a cookie:
Name: cookie-name
Content:value
Host:localhost
controller.js:
var myControllers = angular.module('myControllers', ['ngCookies']);
myControllers.controller('AboutController', [
'$scope',…

BAE
- 8,550
- 22
- 88
- 171
0
votes
1 answer
Angular Cookies don't work after ionic build
I'm tring to store logged in user information in Angular Cookies. Strangely it work's well in browser when I do ionic serve. Also works in phone debug mode using ionic run android -l-c --debug usb debugging mode. But when I do ionic build android…

Pavitar
- 4,282
- 10
- 50
- 82
0
votes
0 answers
AngularJs - $digest() iterations reached with $cookieStore
app.controller('appCtrl', function ($scope, $cookieStore) {
$scope.$watch(function(){return $cookieStore.get('currentUser');}, function(newValue, oldValue){
if(newValue !== oldValue){
$scope.currentUser =…

Jiandong Chen
- 177
- 1
- 1
- 9