Added @Injectable on states

pull/2883/head
Jorge Rocha Gualtieri 5 years ago
parent e5e2fcfed9
commit b35da53cc8

@ -89,7 +89,7 @@ export function storageFactory(): OAuthStorage {
StopPropagationDirective,
LocalizationPipe,
SortPipe,
LocalizationPipe,
LocalizationPipe
],
providers: [LocalizationPipe],
entryComponents: [

@ -1,3 +1,4 @@
import { Injectable } from '@angular/core';
import { Action, createSelector, Selector, State, StateContext, Store } from '@ngxs/store';
import { of } from 'rxjs';
import { switchMap, tap } from 'rxjs/operators';
@ -19,6 +20,7 @@ import { SessionState } from './session.state';
name: 'ConfigState',
defaults: {} as Config.State,
})
@Injectable()
export class ConfigState {
@Selector()
static getAll(state: Config.State) {

@ -1,3 +1,4 @@
import { Injectable } from '@angular/core';
import { Action, Selector, State, StateContext } from '@ngxs/store';
import { tap } from 'rxjs/operators';
import { ChangePassword, GetProfile, UpdateProfile } from '../actions/profile.actions';
@ -8,6 +9,7 @@ import { ProfileService } from '../services/profile.service';
name: 'ProfileState',
defaults: {} as Profile.State,
})
@Injectable()
export class ProfileState {
@Selector()
static getProfile({ profile }: Profile.State): Profile.Response {

@ -1,3 +1,4 @@
import { Injectable } from '@angular/core';
import { State, Action, StateContext, Selector, createSelector } from '@ngxs/store';
import { AddReplaceableComponent } from '../actions/replaceable-components.actions';
import { ReplaceableComponents } from '../models/replaceable-components';
@ -7,6 +8,7 @@ import snq from 'snq';
name: 'ReplaceableComponentsState',
defaults: { replaceableComponents: [] } as ReplaceableComponents.State,
})
@Injectable()
export class ReplaceableComponentsState {
@Selector()
static getAll({

@ -1,3 +1,4 @@
import { Injectable } from '@angular/core';
import {
Action,
Selector,
@ -25,6 +26,7 @@ import { OAuthService } from 'angular-oauth2-oidc';
name: 'SessionState',
defaults: { sessionDetail: { openedTabCount: 0 } } as Session.State,
})
@Injectable()
export class SessionState {
@Selector()
static getLanguage({ language }: Session.State): string {

Loading…
Cancel
Save