1.2.6 (2017-04-20)
- deps: Fixed peer dependencies for Angular 4.x (#52) (6e63e9e)
- ngmodule: Added empty object for NgModule metadata (#39) (95e0021)
1.2.5 (2016-10-13)
1.2.4 (2016-09-19)
1.2.3 (2016-09-16)
1.2.2 (2016-09-15)
1.2.1 (2016-09-13)
1.2.0 (2016-09-13)
1.1.0 (2016-08-30)
1.0.0 (2016-08-27)
- router-store: Router API has changed internally
BEFORE:
Use the routerReducer
when providing Store
:
import { provideStore } from '@ngrx/store';
import { routerReducer } from '@ngrx/router-store';
export const storeProvider = provideStore({
// Your reducers go here,
router: routerReducer
});
Install the bindings providers after you setup the router providers:
import { connectRouterToStore } from '@ngrx/router-store';
bootstrap(App, [
storeProvider,
provideRouter(routes),
connectRouterToStore()
]);
AFTER:
Use the routerReducer
when providing the StoreModule.provideStore
and add the RouterStoreModule.connectRouter()
to the @NgModule.imports
:
import { StoreModule } from '@ngrx/store';
import { routerReducer, RouterStoreModule } from '@ngrx/router-store';
@NgModule({
imports: [
BrowserModule,
StoreModule.provideStore({ router: routerReducer }),
RouterStoreModule.connectRouter()
],
bootstrap: [ AppComponent ]
})
export class AppModule {
}
BEFORE:
import {routerActions} from '@ngrx/store';
store.dispatch(routerActions.go('/path', 'query=string'));
store.dispatch(routerActions.replace('/path', 'query=string'));
store.dispatch(routerActions.search('query=string'));
AFTER:
import {routerActions} from '@ngrx/store';
store.dispatch(routerActions.go('/path', { query: 'string' ));
store.dispatch(routerActions.replace('/path', { query: 'string' ));
store.dispatch(routerActions.search({ query: 'string' ));