Project

General

Profile

« Previous | Next » 

Revision 58989

[Library | Trunk]: Add setItem to localStorage for directLink.

View differences:

localStorage.service.ts
11 11

  
12 12
  constructor(@Inject(PLATFORM_ID) private platformId: string) {
13 13
    if(isPlatformBrowser(this.platformId)) {
14
      let item = localStorage.getItem('communityDirectLink');
14
      let item = localStorage.getItem('directLink');
15 15
      if(item !== null) {
16 16
        this.communityDirectLink = new BehaviorSubject<boolean>(item == 'true');
17 17
      } else {
......
22 22

  
23 23
  public setCommunityDirectLink(value: string) {
24 24
    this.communityDirectLink.next(Boolean(value).valueOf());
25
    localStorage.setItem('directLink', value);
25 26
  }
26 27

  
27 28
  public get(): Observable<boolean> {

Also available in: Unified diff