Security and Administration

ngx-cookie

ngx Cookie for Angular 2 by Salemdar

The Angular 1.x $cookies functionality being introduced to Angular 2+.

Project website https://github.com/salemdar/ngx-cookie

Documentation https://github.com/salemdar/ngx-cookie

License MIT

Demos
1. https://github.com/salemdar/ngx-cookie < examples

Dependencies

“@angular/common”: “^7.0.0”,
“@angular/compiler”: “^7.0.0”,
“@angular/core”: “^7.0.0”,
“@angular/platform-browser”: “^7.0.0”,
“@angular/platform-browser-dynamic”: “^7.0.0”,
“@nguniversal/express-engine”: “^7.0.0”,
“core-js”: “^2.5.7”,
“rxjs”: “^6.3.3”,
“zone.js”: “^0.8.26”

NPM

https://www.npmjs.com/search?q=ngx-cookie

npm install ngx-cookie

Features

  • Allowing to provide the following cookie services: get(), getObject(), getAll(), put(), putObject(), remove(), removeAll()
  • works during Server Side Rendering (SSR)
  • ‘storeUnencoded’, which controls the encoding and storing of a cookie
  • ‘httpOnly’ which controls the ‘httpOnly’ flag
  • ‘secure’ controls the connection type (secure) for the cookie availability
  • ‘expires’, a string/dare value of cookie expiration date
  • ‘domain’ controls the domain/sub-domain access
  • ‘path’ controls available of certain path (<base> tag) for a cookie

You may also like...