Skip to content

Instantly share code, notes, and snippets.

@joewest
Created December 16, 2011 00:08
Show Gist options
  • Save joewest/1483629 to your computer and use it in GitHub Desktop.
Save joewest/1483629 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