ng2-redux
Advanced tools
Changelog
3.3.10
Applied fix addressing #309 - select function called even if state does not change.
Changelog
5.1.0
You can now get an observable to the root state by passing no arguments to
ngRedux.select
:
private this.rootState$: Observable<IAppState>;
constructor(ngRedux: NgRedux) {
this.rootState$ = ngRedux.select();
}
ngRedux.dispatch()
has been tweaked to always run in the Angular zone. This
should prevent unexpected weirdness when dispatching from callbacks to 3rd-party
libraries. See #259 for further discussion.
Changelog
5.0.0
ERROR in NgReduxModule is not an NgModule
error thrown by Angular CLI.connect
pattern: it's simply not a good fit for Angular.
You should be using the select
pattern now.NgRedux
.NgReduxModule.forRoot
is no more. Now just import NgReduxModule
directly.import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgReduxModule } from 'ng2-redux';
@NgModule({
declarations: [
AppComponent
],
imports: [
NgReduxModule.forRoot(),
BrowserModule,
],
providers: [],
bootstrap: [AppComponent]
})
class AppModule {
// etc.
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgReduxModule } from 'ng2-redux';
@NgModule({
declarations: [
AppComponent
],
imports: [
NgReduxModule,
BrowserModule,
],
providers: [],
bootstrap: [AppComponent]
})
class AppModule {
// etc.
}