Skip to content

Commit 4a7d3d8

Browse files
[Fixes #238] Update docs to capture forRoot AoT stuff. (#239)
* [Fixes #238] Update docs to capture `forRoot` AoT stuff. * Update CHANGELOG.md * Update * Update CHANGELOG.md
1 parent f26df2a commit 4a7d3d8

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export class AppModule {
5454
}
5555
```
5656

57-
**IMPORTANT NOTE ABOUT AOT**
57+
**IMPORTANT NOTE ABOUT AOT AND ANGULAR-CLI**
5858

59-
If using the ngc compiler and AoT compilation - `@select` decorators will not work. If you want to use the ngc compiler (either directly, or via angular-cli), and want to use the `@select` - you will need to use the `--aot false` flag.
59+
If using the angular-cli with the --aot option - `@select` decorators will not work. The build process will work, but decorators will silently stop working.
6060

61-
If you want to use AoT - the build process will work, but decorators will silently stop working. If you want to use AoT.
61+
If you need decorators and AoT, you'll need to use the raw ngc compiler directly from the command line.
6262

6363
**before**
6464

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface IAppState { /* ... */ };
5757

5858
@NgModule({
5959
/* ... */
60-
imports: [ /* ... */, NgReduxModule ]
60+
imports: [ /* ... */, NgReduxModule.forRoot() ]
6161
})
6262
export class AppModule {
6363
constructor(ngRedux: NgRedux<IAppState>) {
@@ -89,7 +89,7 @@ export const store: Store<IAppState> = createStore(
8989

9090
@NgModule({
9191
/* ... */
92-
imports: [ /* ... */, NgReduxModule ]
92+
imports: [ /* ... */, NgReduxModule.forRoot() ]
9393
})
9494
class AppModule {
9595
constructor(ngRedux: NgRedux<IAppState>) {

docs/di-middleware.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { LogRemoteName } from './middleware/log-remote-name';
4343

4444
@NgModule({
4545
/* ... */
46-
imports: [ /* ... */, NgReduxModule ],
46+
imports: [ /* ... */, NgReduxModule.forRoot() ],
4747
providers: [
4848
LogRemoteName,
4949
/* ... */

docs/epics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ import { SessionEpics } from './epics';
9191

9292
@NgModule({
9393
/* ... */
94-
imports: [ /* ... */, NgReduxModule ],
94+
imports: [ /* ... */, NgReduxModule.forRoot() ],
9595
providers: [
9696
SessionEpics,
9797
/* ... */

docs/redux-dev-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { NgReduxModule, NgRedux, DevToolsExtension } from 'ng2-redux';
2121
// when you initialize your root component:
2222
@NgModule({
2323
/* ... */
24-
imports: [ /* ... */, NgReduxModule ]
24+
imports: [ /* ... */, NgReduxModule.forRoot() ]
2525
})export class AppModule {
2626
constructor(
2727
private ngRedux: NgRedux,

examples/counter/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Search } from '../components/search.component';
1313
imports: [
1414
BrowserModule,
1515
CommonModule,
16-
NgReduxModule,
16+
NgReduxModule.forRoot(),
1717
],
1818
declarations: [
1919
App,

examples/counter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@angular/platform-browser": "^2.0.0",
3131
"@angular/platform-browser-dynamic": "^2.0.0",
3232
"core-js": "^2.3.0",
33-
"ng2-redux": "^4.0.0-beta.0",
33+
"ng2-redux": "^4.0.0-beta.7",
3434
"redux": "^3.5.0",
3535
"redux-logger": "^2.6.1",
3636
"redux-localstorage": "^0.4.0",

0 commit comments

Comments
 (0)