Example #1
0
 storeAuthenticationToken(jwt, rememberMe) {
     if (rememberMe) {
         this.$localStorage.store('authenticationToken', jwt);
     } else {
         this.$sessionStorage.store('authenticationToken', jwt);
     }
 }
 storeDestinationState(destinationState, destinationStateParams, fromState) {
   const destinationInfo = {
     destination: {
       name: destinationState.name,
       data: destinationState.data
     },
     params: destinationStateParams,
     from: {
       name: fromState.name
     }
   };
   this.$sessionStorage.store('destinationState', destinationInfo);
 }
 storeDestinationState(destinationState, destinationStateParams, fromState) {
     const destinationInfo = {
         'destination': {
             'name': destinationState.name,
             'data': destinationState.data,
         },
         'params': destinationStateParams,
         'from': {
             'name': fromState.name,
         }
     }
     this.$sessionStorage.store('destinationState', destinationInfo)
 }
Example #4
0
 changeLanguage(languageKey: string) {
   this.sessionStorage.store('locale', languageKey);
   this.languageService.changeLanguage(languageKey);
 }
 storeUrl(url: string) {
   this.$sessionStorage.store('previousUrl', url);
 }
 storePreviousState(previousStateName, previousStateParams) {
   const previousState = { name: previousStateName, params: previousStateParams };
   this.$sessionStorage.store('previousState', previousState);
 }
 storePreviousState(previousStateName, previousStateParams) {
     const previousState = { 'name': previousStateName, 'params': previousStateParams }
     this.$sessionStorage.store('previousState', previousState)
 }
Example #8
0
 private addUserToSession(user: User): void {
     this.sessionStorage.store('user', user);
 }