-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
in ember_data_example github source code. It use this approach
transitionAfterSave: function() {
// when creating new records, it's necessary to wait for the record to be assigned
// an id before we can transition to its route (which depends on its id)
if (this.get('content.id')) {
this.transitionToRoute('contact', this.get('content'));
}
}.observes('content.id'),
It works fine, but maybe, this function will be executed whenever model's ID property is changed. I'm finding some more semantic way.
I want transition to be executed when the model's status is changed to 'isDirty' = false && 'isNew' == true form 'isDirty' = true, 'isNew' = false.
How can I implement this?
Metadata
Metadata
Assignees
Labels
No labels