Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
feat(ngrx): add dummy reducer & state for ngrx
Browse files Browse the repository at this point in the history
  • Loading branch information
GiuseppePiscopo committed Jun 22, 2017
1 parent d9e075b commit 3c435b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@angular/router": "4.1.3",
"@ngrx/core": "1.2.0",
"@ngrx/store": "2.2.2",
"@types/js-base64": "2.1.4",
"@types/requirejs": "2.1.28",
"core-js": "~2.4.1",
Expand Down
4 changes: 4 additions & 0 deletions src/app/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import { StoreModule } from '@ngrx/store';

import { AppComponent } from '../app/view/component';
import { appRoutes, appRoutingOpts } from '../app/routing';
import { appReducer } from '../app/reducer';

import { HomeComponent } from '../home/view/home.component';

Expand All @@ -22,6 +24,8 @@ import '../../styles/styles.css';
// custom routing
RouterModule.forRoot(appRoutes, appRoutingOpts),

StoreModule.provideStore(appReducer),

// custom feature modules
SharedModule,
],
Expand Down
8 changes: 8 additions & 0 deletions src/app/reducer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Action } from '@ngrx/store';

export interface AppState {
}

export function appReducer(state: AppState, action: Action): AppState {
return state;
}

0 comments on commit 3c435b0

Please sign in to comment.