Cookies
The CookiesDirective allows you to set, get and remove cookies.
Set Cookie
An example in COMPONENT.template.html.
<ng-container *cookies="let cookie set 'ngxf' value 'Best Of The Best' path '/' domain: 'localhost' expires '01 Oct 2020'">
{{ cookie }}
</ng-container>Get Cookie
An example in COMPONENT.template.html.
<ng-container *cookies="let cookie get 'ngxf'">
{{ cookie }}
</ng-container>Remove Cookie
An example in COMPONENT.template.html.
<ng-container *cookies="let cookie remove 'ngxf' path '/' domain: 'localhost'">
{{ cookie }}
</ng-container>Last updated