1. Firstly, npm install —save ngx-cookie-service —save 2. And then import CookieService in your module like import { CookieService } from ngx-cookie-service; 3. In the module providers, add CookieService 4. In your Component constructor, inject your CookieService as private cookie: CookieService 5. Set your cookie like this.cookie.set(“userid”, “12345”); 6. Get cookie, this.cookie.get(“userid”) ...