Skip to content

Instantly share code, notes, and snippets.

@johanvalcoog
Forked from joewest/gist:1483629
Created January 10, 2012 19:27
Show Gist options
  • Save johanvalcoog/1590656 to your computer and use it in GitHub Desktop.
Save johanvalcoog/1590656 to your computer and use it in GitHub Desktop.
var State = Ember.State.extend({});
var ViewState = Ember.ViewState.extend({});
App.statechart = Ember.StateManager.create({
loggedOut: ViewState.create({}),
loggingIn: ViewState.create({}),
loggedIn: State.create({
appLoadFailed: ViewState.create({}),
appLoading: ViewState.create({}),
appLoaded: State.create({
concurrentSubStates: YES,
pushNotifications: State.create({
pushDisconnected: State.create({}),
pushConnecting: State.create({}),
pushConnected: State.create({}),
}),
displayAppUI: State.create({
concurrentSubStates: YES,
displayUI: ViewState.create({}),
displayModals: State.create({
displayNone: State.create({}),
displaySettings: ViewState.create({}),
displayWarning: ViewState.create({}),
})
backgroundQueue: State.create({})
})
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment