Skip to content

Instantly share code, notes, and snippets.

@cloke
Last active December 11, 2015 17:49
Show Gist options
  • Save cloke/4637506 to your computer and use it in GitHub Desktop.
Save cloke/4637506 to your computer and use it in GitHub Desktop.
this.set('content.name', 'test');
Content isDirty is set to true and css class is added.
record = App.Model.createRecord();
this.set('content', record);
Content isDirty is set to true and css class is not added.
{{view.content.isDirty}}
<div class="label label-important" {{bindAttr class="view.content.isDirty:unsaved"}}>unsaved changes</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment