Skip to content

Instantly share code, notes, and snippets.

@MartinMalinda
Created November 7, 2015 20:08
Show Gist options
  • Save MartinMalinda/fd3b09b5f058a850f48c to your computer and use it in GitHub Desktop.
Save MartinMalinda/fd3b09b5f058a850f48c to your computer and use it in GitHub Desktop.
Miscellaneous Ember inspetor example
// redirect to any route
tempRoute.transitionTo('someOtherRoute', someParam)
// get a JSON object of any model
tempModel.toJSON()
// trigger events on objects
tempObject.trigger('someEvent', 'someParam');
// reload model
tempModel.reload()
// refresh Route
tempRoute.refresh()
// notify property change and recompute the aproppriate computed properties
tempObject.notifyPropertyChange('someProperty')
//add a custom observer on the go
Ember.addObserver(tempObject,'someProperty',tempObject, function(){
console.log('someProperty changed');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment