Node.js is a platform built on Chromes JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices
Cookies are used in multiple requests and browser sessions and can store your account information used by authentication for example.
How to install Cookies Dependency
npm install ngx-cookie-service
After installing the cookies dependency, we have to import the CookieService
inside one of our modules and add them as a provider. Please refer the below example code:
app.module.ts file
Method of Cookies in Angular
- Check :- Used to check cookies exits or not
- Set :- Used to set the value in cookies with name
- Get :- Used to return the single value of stored cookies name
- Get All :- Used to return a value object of all cookies
- Delete :- Used to delete the single cookies value with the given name
- Delete All :- Used to delete all the cookies