Questions tagged [ngx-cookie-service]

ngx-cookie-service is an Angular library that helps to set, get and delete cookies in browser

33 questions
1
vote
1 answer

Can't resolve 'ngx-cookie-service/lib/cookie.service'

In Angular (ver 10.2) I'm trying to use ngx-cookie-service per instructions: Ran "npm install ngx-cookie-service --save" In app.module.ts, added provider as follows: "providers: [CookieService]," In app.module.ts, imported as follows: "import {…
Ben
  • 495
  • 1
  • 7
  • 17
1
vote
0 answers

WARNING in ./node_modules/ngx-cookie-service/fesm2015/ngx-cookie-service.js 147:132-140 "export 'ɵɵinject' was not found in '@angular/core'

I use Angular 7, I am trying to install ngx-cookie-service but get the warning above, and the error: core.js:18374 ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function TypeError: Object(...) is not a function at…
Miriam H
  • 31
  • 6
1
vote
1 answer

Couldn't set cookie using ngx-cookie-service

I'm using angular 9 and I need to set a cookie. I'm using ngx-cookie-service 3.0.4 and I'm trying to do that like the following: this.cookieService.set("cookieName", user.tokenId, date, "/", "localhost:4200"); and when I'm trying to get out this…
John
  • 1,375
  • 4
  • 17
  • 40
1
vote
2 answers

Can't delete cookie with ngx-cookie-service

Im using https://github.com/7leads/ngx-cookie-service delete not working properly , can any one help me to solve this or suggest any other plugin
Divya
  • 11
  • 1
  • 3
1
vote
1 answer

Unable to use ngx-cookie-service with angular 5

I am trying to upgrade my application from angular 2 to angular 5.I have updated all the dependencies and everything is building fine.But, ngx-cookie-service library is creating issues when I am trying to run my application. In app.module.ts, I am…
user3587856
  • 229
  • 4
  • 19
0
votes
1 answer

how to GET a specific cookie value in Angular 14

"I'm using the ngx-cookie-service library in my Angular application, but I'm getting two different cookies on every login as already the session id has been SET in the backend, to GET the correct cookie value, How can I ensure that my Angular…
0
votes
1 answer

ngx-cookie-service does not send Cookies in Angular/Ionic

Angular 16 Ionic 7 ngx-cookie-service 16 With this.cookieService.set('sessionkey', 'a-unique-hash', null, null, null, false, 'Lax'); or this.cookieService.set('sessionkey', 'a-unique-hash'); i set a cookie. In my browser tools can i see the cookie…
Torsten
  • 1
  • 1
0
votes
0 answers

Why is my angular application, using the ngx-cookie-service and jwt, not working with IIS?

After deployment on IIS, the Ngx-cookie-service is not functioning. The browser cookie does not store my token. Is there a setting or configuration that has to be made on IIS? But when I simply run in my IDE using Visual Studio Code, it works.
0
votes
1 answer

Cannot install ngx-cookie-service in angular project

I am working on an angular project in where I need to use cookies. I am installing ngx-cookie-service module from https://www.npmjs.com/package/ngx-cookie-service But the module is not being installed, its showing the following errors npm WARN…
0
votes
1 answer

Angular ngx-cookie-service is lost when browser is closed

I am trying to set a cookie with ngx-cookie-service to be able to retrieve it later The code is working fine when refreshing and the cookie is present in the chrome developer tools - Applications - cookies with an expiry date after a year . when the…
0
votes
2 answers

Angular + Spring Boot - Can't send cookies over HTTPS

I have an Angular 12 front-end application communicating with a Spring Boot back-end one. APIs shall be called passing a CSRF token using a cookie, but it seems like my logic is only working for localhost. Please find the following snippets of…
AlexKibo88
  • 827
  • 1
  • 6
  • 16
0
votes
1 answer

Why are the cookies not setting when not on localhost?

I am building an Angular application and I am using ngx-cookie-service to manipulate the cookies. When I run on my local machine, the cookies are set just fine. When I run on my test server and access it via localhost, it also works just fine. eg:…
Caio Tsubake
  • 101
  • 3
  • 14
0
votes
1 answer

Error: Unexpected value 'CookieService' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation

I'm trying to test a service with jasmine but i have this error: Error: Unexpected value 'CookieService' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation. and Error: Expected undefined to be truthy. My spec file: import…
user16262035
0
votes
1 answer

No name was provided for external module 'ngx-cookie-service' in output.globals – guessing 'ngxCookieService'

Using ng-packagr I got this error during the build: No name was provided for external module 'ngx-cookie-service' in output.globals – guessing 'ngxCookieService' My package.json looks like: { "$schema":…
NicoESIEA
  • 499
  • 1
  • 6
  • 23
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