Browse Source

fix for import ngxs on theme-shared and added @Injectable on theme-basic states as required on angular9

pull/2883/head
Jorge Rocha Gualtieri 7 years ago
parent
commit
67b92cb256
  1. 2
      npm/ng-packs/packages/theme-basic/src/lib/states/layout.state.ts
  2. 7
      npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts

2
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[] {

7
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,

Loading…
Cancel
Save