In EmberJS, how do you update the url in a dynamic route when the model changes?
Because of our URL scheme, we have a dynamic segment route that acts like a file path:
@resource 'node', { path: '/*node_path' }, ->
If the user changes the name of one of the nodes in the path, how do you get the auto-update URL to reflect this? We use ember data.
I tried to add an observer to the models from the controller, but it throws an error because the models change during the en route period.
folderNameUpdated: (->
console.log 'Folder name changed'
Ember.run.next @, ->
@send 'invalidateModel'
).observes('model.name')
+3
source to share
No one has answered this question yet
Check out similar questions: