Nightingale Posing Mischievously
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

knockout-state-renderer

1.0.2 • Public • Published

knockout-state-renderer

npm version

Use Knockout with abstract-state-router!

Examples

Usage

 
var StateRouter = require('abstract-state-router')
var knockoutRenderer = require('knockout-state-renderer')
var domready = require('domready')
 
var stateRouter = StateRouter(knockoutRenderer(/* options */), 'body')
 
// add whatever states to the state router
 
domready(function() {
    stateRouter.evaluateCurrentRoute('login')
})

See state-router-example for an implementation using this renderer.

API

The renderer implementation accepts some options to control data binding inside the templates.

dataItemAlias

An alias used when the binding context is created, accessible inside the templates. The default value is $page.

childElementSelector

The CSS selector used to find the element where the child state should be rendered. The default value is ui-view.

install

npm i knockout-state-renderer

Downloadsweekly downloads

1

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar