Skip to content

Instantly share code, notes, and snippets.

@webmasterdevlin
Last active July 3, 2019 21:50
Show Gist options
  • Save webmasterdevlin/121028ca264a3bde7d07667975b9856f to your computer and use it in GitHub Desktop.
Save webmasterdevlin/121028ca264a3bde7d07667975b9856f to your computer and use it in GitHub Desktop.
NgXS Module: src/app/app.module.ts
import { NgModule } from "@angular/core";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { HttpClientModule } from "@angular/common/http";
import { NgxsModule } from "@ngxs/store";
import { HeroState } from "./heroes/hero.state";
import { NgxsReduxDevtoolsPluginModule } from "@ngxs/devtools-plugin";
import { NgxsLoggerPluginModule } from "@ngxs/logger-plugin";
import { environment } from "../environments/environment";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HeaderNavComponent } from "./shared/components/header-nav.component";
@NgModule({
declarations: [AppComponent, HeaderNavComponent],
imports: [
BrowserAnimationsModule,
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
HttpClientModule,
NgxsModule.forRoot([HeroState], {
developmentMode: !environment.production
}),
NgxsLoggerPluginModule.forRoot(),
NgxsReduxDevtoolsPluginModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment