I know that there is the .set() method to set a boolean to true or false but I want to know if there a method like .set() except it Toggles the value of a boolean.
In this case the boolean isEditing is being set to 'true'.
isEditing:false,
actions: {
edit: function(category){
category.set('isEditing', true);
console.log(this.get('isEditing'))
},
}
Here is the html
{{#if isEditing}}
<div class="category-text">
{{view Ember.TextField valueBinding=name action="turnOffEditMode"}}
</div>
{{else}}
<div class="category-text">
{{#linkTo 'category' this}}
{{name}}
{{/linkTo}}
</div>
{{/if}}
this.toggleProperty('propertyName');
Edit: jsbin for proof