Cookies

The CookiesDirective allows you to set, get and remove cookies.

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>

An example in COMPONENT.template.html.

<ng-container *cookies="let cookie get 'ngxf'">
    {{ cookie }}
</ng-container>

An example in COMPONENT.template.html.

<ng-container *cookies="let cookie remove 'ngxf' path '/' domain: 'localhost'">
    {{ cookie }}
</ng-container>

Last updated