-
-
Save johanvalcoog/1590662 to your computer and use it in GitHub Desktop.
ember.js concurrent substates?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var State = Ember.State.extend({}); | |
var ViewState = Ember.ViewState.extend({}); | |
// existing | |
App.statechart = Ember.StateManager.create({ | |
loggedOut: ViewState.create({}), | |
loggingIn: ViewState.create({}), | |
loggedIn: Ember.StateManager.create({ | |
appLoadFailed: ViewState.create({}), | |
appLoading: ViewState.create({}), | |
appLoaded: State.create({ | |
enter: function() { | |
// start up substates | |
}, | |
exit: function() { | |
// tear down substates | |
}, | |
pushNotifications: Ember.StateManager.create({ | |
pushDisconnected: State.create({}), | |
pushConnecting: State.create({}), | |
pushConnected: State.create({}), | |
}), | |
displayAppUI: State.create({ | |
enter: function() { | |
// start up substates | |
}, | |
exit: function() { | |
// tear down substates | |
}, | |
displayUI: ViewState.create({}), | |
displayModals: Ember.StateManager.create({ | |
displayNone: State.create({}), | |
displaySettings: ViewState.create({}), | |
displayWarning: ViewState.create({}) | |
}), | |
backgroundQueue: Ember.StateManager.create({}), | |
}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment