I m using the asp.net core 2.0 AngularJS template and When I trying to use localStorage in AppComponent itβs says
NodeInvocationException: localStorage is not defined ReferenceError: localStorage is not defined.
I waste much time to fixed this, unfortunately angular2-universal even not working with the asp.net core 2.0 to check the condition isBrowser. Event the localStorage does not working with HomeComponent also.
How can I fixed this. Please help me to fixed this. Thank you.
export class AppComponent {
constructor() {
localStorage.setItem('count', 'not set');
console.log('const');
}
}