Skip to content

Instantly share code, notes, and snippets.

@ksol
Last active April 4, 2016 16:44
Show Gist options
  • Save ksol/1d5ef23d3ad7bb0ec0d0 to your computer and use it in GitHub Desktop.
Save ksol/1d5ef23d3ad7bb0ec0d0 to your computer and use it in GitHub Desktop.
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