Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { NgxsFormPluginModule } from '@ngxs/form-plugin';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
import { NgxsWebsocketPluginModule } from '@ngxs/websocket-plugin';
// import { NgxsRouterPluginModule } from '@ngxs/router-plugin';
import { CounterState } from './counter/counter.state';
@NgModule({
imports: [
NgxsModule.forRoot([CounterState]),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsFormPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot(),
NgxsStoragePluginModule.forRoot(),
NgxsWebsocketPluginModule.forRoot()
// TODO: https://github.com/angular/angular/issues/34191
// NgxsRouterPluginModule.forRoot()
]
})
export class StoreModule {}
@NgModule({
declarations: [
AppComponent,
// GenreCarouselComponent,
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
IonicModule.forRoot(),
NgxsModule.forRoot([ MovieState ]),
NgxsStoragePluginModule.forRoot(),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot(),
NgxsFormPluginModule.forRoot()
],
providers: [MoviesService, YoutubeApiService, SearchImageService],
bootstrap: [AppComponent]
})
export class AppModule {}
imports: [
CommonModule,
HttpClientModule,
FontAwesomeModule,
MatSnackBarModule,
NgxPageScrollCoreModule.forRoot({ _logLevel: 3 }),
NavigatorModule.forRoot(defaultMenu),
// NOTE: NGXS: If you have feature modules they need to be imported after the root module.
NgxsModule.forRoot([MenuState, PreferenceState, ProfileState, AppState], {
developmentMode: !environment.production,
}),
NgxsStoragePluginModule.forRoot({
// FIXME: https://github.com/ngxs/store/issues/902
key: ['preference', 'app.installed', 'auth.isLoggedIn'],
}),
NgxsFormPluginModule.forRoot(),
NgxsWebsocketPluginModule.forRoot({
url: environment.WS_EVENT_BUS_URL,
}),
NgxsRouterPluginModule.forRoot(),
AuthModule.forRoot(),
// OidcModule.forRoot({
// providerConfig: { ...environment.auth, provider: OidcProvider.Keycloak },
// initConfig: {
// onLoad: OidcOnLoad.CheckSso,
// flow: OidcFlow.Standard,
// },
// resourceInterceptorConfig: {
// allowedUrls: [environment.API_BASE_URL, environment.DOCS_BASE_URL],
// },
// postLoginRedirectUri: environment.baseUrl + 'dashboard',
// postLogoutRedirectUri: environment.baseUrl + 'home',
import { NgxsStoragePluginOptions } from '@ngxs/storage-plugin/src/symbols';
@NgModule({
providers: [
CoreService,
],
exports: [
ClarityModule,
ClrFormsNextModule,
],
imports: [
CommonModule,
HttpClientModule,
// NgxPageScrollModule,
NgxsModule.forRoot([]),
NgxsFormPluginModule.forRoot(),
NgxsRouterPluginModule.forRoot(),
ClarityModule,
ClrFormsNextModule,
GraphqlModule,
AuthModule,
I18nModule,
NgxsReduxDevtoolsPluginModule.forRoot({
disabled: environment.production,
}),
NgxsStoragePluginModule.forRoot({
key: 'auth.token',
}),
]
})
export class CoreModule {
constructor(
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { CommonModule } from '@angular/common';
import { NgxsFormPluginModule } from '@ngxs/form-plugin';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { NgxsRouterPluginModule } from '@ngxs/router-plugin';
import { TodosState } from '@integration/store/todos/todos.state';
import { TodoState } from '@integration/store/todos/todo/todo.state';
import { environment as env } from '../../environments/environment';
@NgModule({
imports: [
CommonModule,
NgxsFormPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot({ logger: console, collapsed: false }),
NgxsReduxDevtoolsPluginModule.forRoot({ disabled: env.production }),
NgxsRouterPluginModule.forRoot(),
NgxsModule.forRoot([TodosState, TodoState], { developmentMode: !env.production })
],
exports: [
NgxsFormPluginModule,
NgxsLoggerPluginModule,
NgxsReduxDevtoolsPluginModule,
NgxsModule
]
})
export class NgxsStoreModule {}
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { NgxsFormPluginModule } from '@ngxs/form-plugin';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
import { NgxsWebsocketPluginModule } from '@ngxs/websocket-plugin';
import { NgxsRouterPluginModule } from '@ngxs/router-plugin';
import { AppState } from './app.state';
@NgModule({
imports: [
NgxsModule.forRoot([AppState]),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsFormPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot(),
NgxsStoragePluginModule.forRoot(),
NgxsWebsocketPluginModule.forRoot(),
NgxsRouterPluginModule.forRoot()
],
exports: [NgxsModule]
})
export class StoreModule {}
import { MeasuresState } from './states/measures/measures.state';
import { UserState } from './states/user/user.state';
@NgModule({
declarations: [AppComponent, MenuComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
IonicStorageModule.forRoot({
name: 'ord-db',
driverOrder: ['sqlite']
}),
NgxsModule.forRoot([DevicesState, MeasuresState, UserState]),
NgxsFormPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot({
disabled: environment.production
}),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
}),
HttpClientModule
],
providers: [
StatusBar,
SplashScreen,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
import { AppComponent } from './app.component';
import { routes } from './app.routes';
import { states } from './app.state';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule,
RouterModule.forRoot(routes),
NgxsModule.forRoot(states, { developmentMode: !environment.production }),
NgxsStoragePluginModule.forRoot({
key: ['todos.todo']
}),
NgxsFormPluginModule.forRoot(),
NgxsLoggerPluginModule.forRoot({ logger: console, collapsed: false }),
NgxsReduxDevtoolsPluginModule.forRoot({
disabled: environment.production
})
],
bootstrap: [AppComponent]
})
export class AppModule {}
@NgModule({
declarations: [
AppComponent,
MyAddressComponent,
LoginComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule, ReactiveFormsModule,
NgxsModule.forRoot([MyAddressState, LoginState]),
NgxsReduxDevtoolsPluginModule.forRoot(),
NgxsFormPluginModule.forRoot(),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { NgxsFormPluginModule } from '@ngxs/form-plugin';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxsModule.forRoot(),
NgxsFormPluginModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }