From 67b92cb2567bef8e84ae9f86f9f302faec6c15f5 Mon Sep 17 00:00:00 2001 From: Jorge Rocha Gualtieri Date: Thu, 20 Feb 2020 18:25:37 -0300 Subject: [PATCH] fix for import ngxs on theme-shared and added @Injectable on theme-basic states as required on angular9 --- .../packages/theme-basic/src/lib/states/layout.state.ts | 2 ++ .../packages/theme-shared/src/lib/theme-shared.module.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts b/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts index 1c90803638..93f4352d69 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts @@ -1,3 +1,4 @@ +import { Injectable } from '@angular/core'; import { Action, Selector, State, StateContext } from '@ngxs/store'; import snq from 'snq'; import { AddNavigationElement, RemoveNavigationElementByName } from '../actions/layout.actions'; @@ -7,6 +8,7 @@ import { Layout } from '../models/layout'; name: 'LayoutState', defaults: { navigationElements: [] } as Layout.State, }) +@Injectable() export class LayoutState { @Selector() static getNavigationElements({ navigationElements }: Layout.State): Layout.NavigationElement[] { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 4a2c785554..30c543ba86 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -25,6 +25,7 @@ import { chartJsLoaded$ } from './utils/widget-utils'; import { PaginationComponent } from './components/pagination/pagination.component'; import { LoadingComponent } from './components/loading/loading.component'; import { LoadingDirective } from './directives/loading.directive'; +import { NgxsModule } from '@ngxs/store'; export function appendScript(injector: Injector) { const fn = () => { @@ -38,7 +39,11 @@ export function appendScript(injector: Injector) { } @NgModule({ - imports: [CoreModule, NgxValidateCoreModule], + imports: [ + CoreModule, + NgxValidateCoreModule, + NgxsModule.forRoot([]) + ], declarations: [ BreadcrumbComponent, ButtonComponent,