Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {AppComponent} from './app.component';
import {AppEventBusEffects} from './app.event-bus.effects';
import {AppEventBusService} from './app.event-bus.service';
import {EventBusService} from './shared/event-bus.service';
@NgModule({
bootstrap: [
AppComponent
],
declarations: [
AppComponent
],
imports: [
BrowserModule,
StoreModule.forRoot(reducers),
EffectsModule.forRoot([AppEventBusEffects]),
!environment.production ? StoreDevtoolsModule.instrument({maxAge: 25}) : []
],
providers: [
EventBusService, // Should be first, since AppEventBusService depends on it
AppEventBusService
]
})
export class AppModule {
}
ViewsEffects,
VideosEffects,
UserNotificationsEffects,
SequencesEffects,
];
@NgModule({
imports: [
StoreModule.forRoot(reducers, {
initialState: initialAppState,
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
}),
EffectsModule.forRoot(effects),
environment.storeDevtools
? StoreDevtoolsModule.instrument({maxAge: 250, name: `Lumeer NgRx Store (${location.hostname})`})
: [],
],
declarations: [],
})
export class AppStoreModule {}
import { NewBookComponent } from './components/new-book/new-book.component';
@NgModule({
declarations: [
AppComponent,
BookListComponent,
NewBookComponent,
BookListEntryComponent,
BookDetailComponent
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
BookModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { NxModule } from '@nrwl/nx';
import { reducers } from './index';
import { ItemsEffects } from './items/items.effects';
import { WidgetsEffects } from './widgets/widgets.effects';
import { UsersEffects } from './users/users.effects';
@NgModule({
imports: [
CommonModule,
NxModule.forRoot(),
StoreModule.forRoot(reducers),
StoreDevtoolsModule.instrument({ maxAge: 5 }),
EffectsModule.forRoot([ItemsEffects, WidgetsEffects, UsersEffects]),
],
declarations: []
})
export class StateModule { }
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
CoreModule,
TranslateModule.forRoot(),
RouterTestingModule,
EffectsModule.forRoot([]),
StoreModule.forRoot(fromStore.reducers, {
runtimeChecks: {
strictStateImmutability: true,
strictActionImmutability: true,
},
}),
],
providers: [AuthGuardService],
});
});
{ path: '', pathMatch: 'full', redirectTo: '/talks' },
{ path: 'talks', component: TalksAndFiltersComponent },
{ path: 'talk/:id', component: TalkDetailsComponent }
]),
NxModule.forRoot(),
StoreModule.forRoot(
{},
{
metaReducers: !environment.production ? [] : [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true
}
}
),
EffectsModule.forRoot([TalksEffects]),
!environment.production ? StoreDevtoolsModule.instrument() : [],
StoreRouterConnectingModule.forRoot(),
StoreModule.forFeature(fromTalks.TALKS_FEATURE_KEY, fromTalks.reducer)
],
providers: [Backend, WatchService],
bootstrap: [AppComponent]
})
export class AppModule {}
const routes: Routes = [
{path: '', redirectTo: 'about', pathMatch: 'full'},
{path: 'about', component: AboutComponent},
{ path: 'cards', loadChildren: './cards.module#CardsModule'}
]
@NgModule({
declarations: [
AppComponent,
AboutComponent,
],
imports: [
BrowserModule,
RouterModule.forRoot(routes, {useHash: true}),
StoreModule.forRoot(reducers, { metaReducers }),
EffectsModule.forRoot([]),
],
bootstrap: [AppComponent]
})
export class AppModule { }