I'm curious is there a nice way to use observables to get a cookie value in real time, a "reactive" cookie?
The possible solutions show using this.cookieService.get("cookieName)
in services, but I need a selector so that I can use the cookie value for my obseravbles.
What's the best way to show the cookie value in the template using observables + selectors with ngx-cookie-service?
134 views Asked by Haradzieniec At
1
One way of using cookieService is by creating a service like below:
Use the CookieService in your component or service:
Here is the Code of HostListener