JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

angular2-cookie

Library that implements Angular 1.x $cookies service in Angular 2

  • ({ paths { }, map tells the System loader where to look for things map { our app is within the app folder app , , , , , , , , , , , }, packages tells the System loader how to load when no filename and/or no extension packages { app { main , defaultExtension }, rxjs { defaultExtension }, { main , defaultExtension }, { main , defaultExtension } } }); })( );

    CookieService class is an injectable service with angular decorator.

  • This module supports angular universal through angular service overrides, make sure you add something like the following to your backend module instead of adding the CookieService provider

    Here you can find some usage examples with popular boilerplate libraries.

  • Also add to the and object in the (path: )

    An Angular 2 Starter kit featuring Angular 2 and Webpack 2 by @AngularClass (Link: to the array in the file (path: ):

    There are 7 methods available in the (6 standard methods from Angular 1 and 1 extra method for convenience)

    Returns the value of given cookie key.

  • Returns the deserialized value of given cookie key.
  • Returns a key value object with all the cookies.



GitHub

http://twitter.com/Sebamueller

Comments are closed, but trackbacks and pingbacks are open.