I am trying to make User Authentication with Angular and ASP.NET Core.
I am following the tutorial found here:
https://fullstackmark.com/post/10/user-authent
Put localStorage.getItem(...)
on `ComponentDidMount()``
You can use standard API for localstorage, like
localStorage.setItem(k, v)
and
localStorage.getItem(k)
but If you want a angular solution for this and find a good library for localstorage, one I'm using is this
https://github.com/marcj/angular2-localstorage
also
https://www.npmjs.com/package/angular2-cool-storage
is cool to use.
The standard localStorage API should be available.
No need to declare it.
to set
localStorage.setItem('name', 'storingSomething');
to get
localStorage.getItem('name');