Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dagstuan committed Aug 11, 2016
1 parent d0bb51c commit 12f2220
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ng2-redux-router
# ng2-redux-router 1.0.3
### Bindings to connect @angular/router to ng2-redux

This package uses the new v3 alpha router for angular 2 `@angular/[email protected]beta.2`.
This package uses the new v3 router for angular 2 `@angular/[email protected]rc.1`.

### Setup

Expand All @@ -21,18 +21,35 @@ This package uses the new v3 alpha router for angular 2 `@angular/[email protected]
});
```

3. Bootstrap the bindings in your root component.
3. Add the bindings to your root module.
```ts
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgRedux } from 'ng2-redux';
import { ROUTER_PROVIDERS } from '@angular/router';
import { NgReduxRouter } from 'ng2-redux-router';
import { RouterModule } from '@angular/router';
import { routes } from './routes';

bootstrap(App, [
ROUTER_PROVIDERS,
NgRedux,
NgReduxRouter
]);
```
@NgModule({
imports: [
RouterModule.forRoot(routes),
// ...your imports
],
declarations: [
AppComponent,
// ...your declarations
],
providers: [
NgRedux,
NgReduxRouter,
// ...your providers
],
bootstrap: [
AppComponent
]
})
export class AppModule {}
```

4. Initialize the bindings from your app component
```ts
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-redux-router",
"version": "1.0.2",
"version": "1.0.3",
"description": "Bindings from the router in Angular 2 to the redux state",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 12f2220

Please sign in to comment.