Skip to content

Instantly share code, notes, and snippets.

@kgish
Created November 30, 2015 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgish/4a93d4d84324628f0a79 to your computer and use it in GitHub Desktop.
Save kgish/4a93d4d84324628f0a79 to your computer and use it in GitHub Desktop.
Emberjs: Getting another store from controller
App.FormController = Em.ObjectController.extend({
tagArray: Em.A(),
init: function() {
this.setTagArray();
this._super();
},
setTagArray: function() {
var _this = this;
// Set the array
_this.get('controller.store').find('tag').then(function(tags) {
_this.set('tagArray', tags);
}
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment