Jan 15, 2020 in Angular
Q: In Angular, describe how will you set, get and clear cookies?

1 Answer

0 votes
Jan 15, 2020
For using cookies in Angular, you need to include a  module called ngCookies angular-cookies.js.

To set Cookies – For setting the cookies in a key-value format ‘put’ method is used.


To get Cookies – For retrieving the cookies ‘get’ method is used.


To clear Cookies – For removing cookies ‘remove’ method is used.

Click here to read more about Angular JS
Click here to read more about Insurance