I want to use Local or session storage to save authentication token in angular 2.0.0. I use angular2-localstorage
angular 2.0.0.
angular2-localstorage
import { Injectable,OpaqueToken } from '@angular/core'; export const localStorage = new OpaqueToken('localStorage');
Place these lines in the top of the file, it should resolve the issue.