The standard localStorage
API should be available, just do e.g.:
localStorage.setItem('whatever', 'something');
It’s pretty widely supported.
Note that you will need to add "dom"
to the "lib"
array in your tsconfig.json
if you don’t already have it.
More Related Contents:
- How to save an image to localStorage and display it on the next page?
- How do I include a JavaScript script file in Angular and call a function from that script?
- How to check whether a Storage item is set?
- Angular 2 Sibling Component Communication
- JS : Convert Array of Strings to Array of Objects
- How to force Angular2 to POST using x-www-form-urlencoded
- How can I close a dropdown on click outside?
- In Angular, how do you determine the active route?
- How to Update a Component without refreshing full page – Angular
- script tag in angular2 template / hook when template dom is loaded
- Upgrading to angular-6.x gives “Uncaught ReferenceError: global is not defined”
- How to subscribe to an event on a service in Angular2?
- How to add background-image using ngStyle (angular2)?
- Separate Angular2 TypeScript files and JavaScript files into different folders, maybe ‘dist‘
- How to save data from a form with HTML5 Local Storage?
- Call a function on click event in Angular 2
- Angular2 too many file requests on load
- How to add bootstrap in angular 6 project? [duplicate]
- What are differences between SystemJS and Webpack?
- Angular2 dynamic change CSS property
- Get Image or byte data with http
- Plain Javascript as Angular 2 service
- TypeScript TS7015: Element implicitly has an ‘any’ type because index expression is not of type ‘number’
- Angular 2 AuthGuard Service with redirect?
- Observable.forkJoin with a for loop
- binding data to angular checkbox
- How to detect firestore connection failure
- Push JSON Objects to array in localStorage
- Save data to local storage
- iframe inside angular2 component, Property ‘contentWindow’ does not exist on type ‘HTMLElement’