Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { DemoCoreModule, CounterEffects } from 'ngrx-demo-core';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
IonicModule.forRoot(MyApp),
DemoCoreModule,
StoreModule.provideStore(reducer),
StoreDevtoolsModule.instrumentOnlyWithExtension(),
EffectsModule.runAfterBootstrap(CounterEffects)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
const routes: Routes = [
{path: 'tasks', component: TasksComponent}
];
@NgModule({
declarations: [
AutoFocusDirective,
TaskFormComponent,
TaskItemComponent,
TaskListComponent,
TaskListFilterPipe,
TasksComponent
],
imports: [
EffectsModule.runAfterBootstrap(TaskEffects),
FormsModule,
RouterModule.forChild(routes),
SharedModule
],
providers: [
TaskActions,
TaskService
]
})
export class TasksModule {}
export { Task, TaskService, taskReducer };
import { NgModule } from '@angular/core';
import { EffectsModule } from '@ngrx/effects';
//import { CounterActions } from './counter.actions';
import { CounterEffects } from './counter.effects';
import { counterReducer } from './counter.reducer';
@NgModule({
declarations: [
],
imports: [
EffectsModule.runAfterBootstrap(CounterEffects)
],
providers: [
//CounterActions
]
})
export class CounterModule {}
import { reducer } from './app.reducer';
import { AppComponent } from './app.component';
@NgModule({
bootstrap: [
AppComponent
],
declarations: [
AppComponent
],
imports: [
BrowserModule,
DemoCoreModule,
StoreModule.provideStore(reducer),
StoreDevtoolsModule.instrumentOnlyWithExtension(),
EffectsModule.runAfterBootstrap(CounterEffects)
],
providers: []
})
export class AppModule { }