Cookies in Angular?

To store the Login Token in need to create a Cookie
But i could not find anything about cookies in Angular

the only thing i found was a this “ngx-cookie-service”
once i installed it and tryed to use it according to this page:

I get Error:

*ERROR in ./node_modules/ngx-cookie-service/fesm2020/ngx-cookie-service.mjs 1:0-61

Module not found: Error: Can’t resolve ‘@nguniversal/express-engine/tokens’ in 'C:\Users\Gebruiker\Desktop\Angular\RestaurantProject\RestaurantProject\ClientApp\node_modules\ngx-cookie-service\fesm2020’

ERROR

node_modules/ngx-cookie-service/lib/cookie.service.d.ts:1:25 - error TS7016: Could not find a declaration file for module ‘express’. ‘C:/Users/Gebruiker/Desktop/Angular/RestaurantProject/RestaurantProject/ClientApp/node_modules/express/index.js’ implicitly has an ‘any’ type.
*** Try npm i --save-dev @types/express if it exists or add a new declaration (.d.ts) file containing declare module 'express';***

1 import { Request } from ‘express’;*

I have installed the i --save-dev @types/express as well and imported it
and still giving the save error

I have done everything that i should do according to the page.
Looking at some github topics this problem seems to be around for more than 4 years.

Does anyone know how to create a Cookie in Angular?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.