2.0.0 • Published 7 years ago

apeman-service-view v2.0.0

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

apeman-service-view

Build Status Code Climate Code Coverage npm Version JS Standard

Service for views

Installation

$ npm install apeman-service-view --save

Usage

#!/usr/bin/env node

'use strict'

const { ApViewService } = require('apeman-service-view')
const { createStore } = require('redux')
const { reducer } = require('apeman-service-base')
const co = require('co')

co(function * () {
  let store = createStore(reducer)
  let service = new ApViewService(store)


}).catch((err) => console.error(err))

API

apeman-service-view@1.0.2

Service for views

Functions

create(args) -> ApViewService

Create the service instance

ParamTypeDescription
args*

ApViewService Class

Service

new ApViewService(store, options)

Constructor of ApViewService class

ParamTypeDescription
storeObjectRedux store
optionsObjectOptional settings

service.pushView(stackName, viewName, viewParams, options) -> Promise

Push a view into a stack

ParamTypeDescription
stackNamestringName of stack
viewNamestringName of view
viewParamsObjectParams to pass
optionsObjectOptional settings

service.popView(stackName) -> Promise

Pop view from a stack

ParamTypeDescription
stackNamestringName of stack

service.popAllViews(stackName) -> Promise

Pop all views from a stack

ParamTypeDescription
stackNamestringName of stack

License

This software is released under the MIT License.

Links