0.3.1 • Published 8 years ago

ember-binding-macros v0.3.1

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

Ember Binding Macros

npm version Ember Observer Score Build Status

Ember has a great data binding system that is used in its templates. There is also a limited object syntax for it.

This addon enhances that syntax by letting you bind any property of an object to any other property by giving it a propertyBindings array:

var Staircase = Ember.Object.create({
  propertyBindings: ['fourth > third', 'third > second', 'second > first']
})

var stairs = Staircase.create({
  fourth: 'Redpaint'
})

stairs.get('third') //=> Redpaint
stairs.get('second') //=> Redpaint
stairs.get('first') //=> Redpaint

stairs.set('third', 'Bluepaint') //=> Bluepaint

stairs.get('second') //=> Bluepaint
stairs.get('first') //=> Bluepaint
stairs.get('fourth') // Redpaint

Installation

  • git clone this repository
  • npm install --save ember-binding-macros

Running Tests

  • ember test
  • ember test --server
0.3.1

8 years ago

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago