diff --git a/package.json b/package.json index e6ee583..359ea2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng2-md-datatable", - "version": "1.2.0", + "version": "1.2.1", "description": "Angular 2 DataTable component for using with Material 2", "main": "dist/index.js", "scripts": { diff --git a/src/helpers.ts b/src/helpers.ts index f2befb5..f92452a 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -3,6 +3,8 @@ import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { datatableReducer } from './md-datatable.reducer'; + // I had to use these private things... :( // Hope that this can be improved when @ngrx/store 4.x is releases import { @@ -58,6 +60,9 @@ export function customFeatureStoreModule( }; } +// static export (for AOT) +export const CustomFeatureStoreModule: ModuleWithProviders = customFeatureStoreModule(datatableReducer); + // I don't get why we don't have this unmount$ observable as default in Angular... export abstract class BaseComponent implements OnDestroy { unmount$: Observable; diff --git a/src/md-datatable.module.ts b/src/md-datatable.module.ts index a262fe2..05d79d5 100644 --- a/src/md-datatable.module.ts +++ b/src/md-datatable.module.ts @@ -15,8 +15,7 @@ import { MdDataTableHeaderComponent } from './md-datatable-header.component'; import { MdDataTableColumnComponent } from './md-datatable-column.component'; import { MdDataTableRowComponent } from './md-datatable-row.component'; import { MdDataTablePaginationComponent } from './md-datatable-pagination.component'; -import { customFeatureStoreModule } from './helpers'; -import { datatableReducer } from './md-datatable.reducer'; +import { CustomFeatureStoreModule } from './helpers'; import { MdDatatableActions } from './md-datatable.actions'; @NgModule({ @@ -24,7 +23,7 @@ import { MdDatatableActions } from './md-datatable.actions'; CommonModule, MaterialModule, FormsModule, - customFeatureStoreModule(datatableReducer), + CustomFeatureStoreModule, ], declarations: [ MdDataTableComponent,