Want to transition after saving model of ember data? Ideally, the id is not supposed to change. However, you are correct, semantically, this method doesn’t seem right.
There is a cleaner way to do this:
1 2 3 4 5 6 7 | save: function(contact) { contact.one('didCreate', this, function(){ this.transitionToRoute('contact', contact); }); this.get('store').commit(); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.