0.0.3 • Published 7 years ago

generator-firedux v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

generator-firedux NPM version Build Status Dependency Status Coverage Status

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

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago