@attus/cookie-service
v2.0.0
Published
[![GitHub release](https://img.shields.io/github/release/attus74/cookie-service.svg)](https://GitHub.com/attus74/cookie-service/releases/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/attus74/cookie-servic
Downloads
46
Readme
CookieService
Yes, I know, the services have weird names. I don't want to change them, in order to maintain compatibility.
In module.ts:
import {CookieServiceModule} from '@attus/cookie-service';
imports: [
CookieServiceModule,
],
In component.ts:
import {CookieServiceService} from '@attus/cookie-service';
const a: string = this.cookieService.get(cookie_name);
this.cookieService.set(cookie_name, cookie_value);
this.cookieService.delete(cookie_name);
You may use a simplified service for Refresh Token. It is applicable for Angular Client.
In module.ts:
import { CookieTokenServiceService } from '@attus/cookie-service';
@NgModule({
imports: [
AngularClientModule,
],
providers: [
{
provide: 'ANGULAR_CLIENT_TOKEN_SERVICE',
useClass: CookieTokenServiceService,
},
{
provide: 'ANGULAR_CLIENT_CONFIG',
useValue: environment.apiClient,
}
],
bootstrap: [AppComponent]
})
export class AppModule {}