Created
November 7, 2015 20:08
-
-
Save MartinMalinda/fd3b09b5f058a850f48c to your computer and use it in GitHub Desktop.
Miscellaneous Ember inspetor example
This file contains hidden or 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
// 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