Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Last active April 7, 2018 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/ee4e30c12fe0c5c34f0b26defc8960a6 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/ee4e30c12fe0c5c34f0b26defc8960a6 to your computer and use it in GitHub Desktop.
import { LocalStorage } from '@ngx-pwa/local-storage';
@Injectable()
export class YourService {
constructor(protected localStorage: LocalStorage) {}
ngOnInit() {
this.localStorage.setItem('lang', 'fr').subscribe(() => {
// Done
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment