ContributorsLast modified on: Mar 25, 2016
farhan687

Problem

You want to increment or decrement a property.

Solution

Use the incrementProperty or decrementProperty methods of Ember.Object.

To increment:

person.incrementProperty('age');

To decrement:

person.decrementProperty('age');

Discussion

You can optionally specify a value to increment or decrement by:

person.incrementProperty('age', 10);

Example

JS Bin