generator-firedux

0.0.3 • Public • Published

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
  newstoreNewstoreI[]
}

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

Package Sidebar

Install

npm i generator-firedux

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • gmarcos87