Last active
April 4, 2016 16:44
-
-
Save ksol/1d5ef23d3ad7bb0ec0d0 to your computer and use it in GitHub Desktop.
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
import Ember from 'ember'; | |
export default Ember.Service.extend({ | |
// Properties | |
post: null, | |
aParentObject: null, | |
anotherParentObject: null, | |
// API | |
setContext(obj = {}) { | |
this.setProperties({ | |
post: obj.mission, | |
aParentObject: obj.aParentObject, | |
anotherParentObject: obj.anotherParentObject, | |
}); | |
}, | |
resetContext() { | |
this.setProperties({ | |
post: null, | |
aParentObject: null, | |
anotherParentObject: null, | |
}); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment