Skip to content

nx-js/bindable-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The bindable middleware

The bindable middleware adds the $bindable method to elements, which can be used to make any element bindable.

  • name: bindable
  • middleware dependencies: attributes
  • all middleware dependencies: observe, attributes
  • type: component or content middleware
  • ignores: text nodes
  • docs

Installation

npm install @nx-js/bindable-middleware

Usage

const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const style = require('@nx-js/bindable-middleware')

component()
  .use(observe)
  .use(attributes)
  .use(bindables)
  .use(elem => elem.$bindable({mode: 'two-way', on: 'input'}))
  .register('bindable-comp')
<bindable-comp name="prop" bind></bindable-comp>

About

An NX middleware, responsible for data-binding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published