nc

ngx-cookies

Angular X (Angular 2+) cookies package

Showing:

Popularity

Downloads/wk

93

GitHub Stars

3

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Angular Cookies

Readme

ngx-cookies

A simple cookies package for Angular X (Angular 2+).

How to install?

$ npm install ngx-cookies

import { NgXCookies } from 'ngx-cookies';

Use static methods as pleased.

Available methods

getCookie(cookieName: string): string

Example: NgXCookies.getCookie(<ID>);

Default validityType is in minutes. Also accepts hours || days

setCookie(cookieName: string, value: string, validity?: number, validityType?: string, domain?: string, path?: string, needsSecureConnection?: boolean)

Example cookie that expires in 24hrs: NgXCookies.setCookie(<ID>, <VALUE>, 24, 'hours');

deleteCookie(cookieName: string, domain?: string, path?: string)

Example: NgXCookies.deleteCookie(<ID>);

exists(cookieName: string): boolean

Example: NgXCookies.exists(<ID>);

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100