generator-firedux
v0.0.3
Published
ngRx/store generator for Ionic2 projects
Downloads
4
Maintainers
Readme
generator-firedux
ngRx/store generator for Ionic2 proyects
Installation
First, install Yeoman and generator-firedux using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-firedux
Then in your ./ionic-app/src generate your new store (ngrx/store + AngularFire + Ionic2):
yo firedux newstore
Import your new store in app.module.ts
import { NewstoreActions } from '../actions/newstore.actions'
import { NewstoreEffects } from '../effects/newstore.effects'
import { NewstoreReducer } from '../reducers/newstore.reducer'
import { NewstoreService } from '../providers/newstore.service'
...
imports: [
...//others effects or imports
EffectsModule.runAfterBootstrap(NewstoreEffects)
StoreModule.provideStore({ newstore: NewstoreReducer, otherstore: OtherstoreReducer })
]
...
providers :[
...//others providers or services
NewstoreService,
NewstoreActions
]
Add Newstore to services/app-state.ts
...
import { NewstoreI } from '../models/newstore.model';
...
export interface AppState {
...//others stores
newstore: NewstoreI[]
}
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © Marcos Gutierrez