I have the following StateManager:
Lead.StateManager = Ember.StateManager.extend
initialState: 'notParsing'
notParsing: Ember.State.create
startParsing: (manager, search) ->
manager.goToState 'parsing'
parsing: Ember.State.create
enter: ->
I am able to transition from the notParsing state to the parsing state by using the send method of the stateManager like this:
@state_manager.send('startParsing', {search_url: "http://thesoftwaresimpleton.com/"})
I can pass arguments via the send message but I cannot pass arguments using goToState because it only accepts a name argument.
Can anybody point out how I can pass the argument that is passed into startParsing action?
I don’t know if my solution is a good one and it surely depends on the use case, but you could store properties on the
manageritself, see http://jsfiddle.net/pangratz666/6Q39q/.Another solution would be to use controllers, which are set on the
stateManagerinstance, see http://jsfiddle.net/pangratz666/Y9KyA/.