I'm currently using angular 9
and I have an issue with setting a cookie. I have integrated ngx-cookie-service 3.0.4
into my project and I'm attempting to set the cookie as shown below:
this.cookieService.set("cookieName", user.tokenId, date, "/", "localhost:4200");
However, when attempting to retrieve this cookie, I am receiving a null response and do not see the cookie in the browser. Here is how I am trying to retrieve the cookie:
console.log("COOKIE: ", this.cookieService.get("cookieName));
What could I possibly be doing wrong?