How do I transition to a route pragmatically from inside a component action?
I tried to use @get('controller').transitionToRoute('images')
, but the controller refers to the component itself. I understand that components should be self contained, so should I be using a view instead to interact with controllers/routes better?
Example
App.ImageEditorComponent = Ember.Component.extend
...
actions:
delete: ->
App.Files.removeObject(object)
@transitionToRoute('images') # This throws an exception
...