Skip to content

Instantly share code, notes, and snippets.

@roelofjan-elsinga
Last active July 2, 2018 18:42
Show Gist options
  • Save roelofjan-elsinga/1f1ccda2be55030640dadff6fb13b4d3 to your computer and use it in GitHub Desktop.
Save roelofjan-elsinga/1f1ccda2be55030640dadff6fb13b4d3 to your computer and use it in GitHub Desktop.
Initialize ng2-redux in Angular
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
import {NgRedux, NgReduxModule} from '@angular-redux/store';
import {store} from "./redux";
import {IAppState} from "./redux/interfaces/state";
@NgModule({
declarations: [
AppComponent
],
imports: [
NgReduxModule,
],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(private ngRedux: NgRedux<IAppState>) {
ngRedux.provideStore(store);
}
ngDoBootstrap() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment