TrilonIO/aspnetcore-angular-universal

Add Dependency Injection (Client & Server abstraction) localStorage example

MarkPieszak opened this issue · 0 comments

Example implementation to add:

export class BrowserStorage implements StorageService {
}

export class ServerStorage implements StorageService {
}

Then you want your abstraction Class.

export class StorageService {
    getItem (key:string) {}
    setItem (key:string, val: any) => {}
}