[Library | Trunk]: Add setItem to localStorage for directLink.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58989 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
16b1903d3c
commit
409231cef6
|
@ -11,7 +11,7 @@ export class LocalStorageService {
|
|||
|
||||
constructor(@Inject(PLATFORM_ID) private platformId: string) {
|
||||
if(isPlatformBrowser(this.platformId)) {
|
||||
let item = localStorage.getItem('communityDirectLink');
|
||||
let item = localStorage.getItem('directLink');
|
||||
if(item !== null) {
|
||||
this.communityDirectLink = new BehaviorSubject<boolean>(item == 'true');
|
||||
} else {
|
||||
|
@ -22,6 +22,7 @@ export class LocalStorageService {
|
|||
|
||||
public setCommunityDirectLink(value: string) {
|
||||
this.communityDirectLink.next(Boolean(value).valueOf());
|
||||
localStorage.setItem('directLink', value);
|
||||
}
|
||||
|
||||
public get(): Observable<boolean> {
|
||||
|
|
Loading…
Reference in New Issue