Skip to content

Instantly share code, notes, and snippets.

@belackriv
Created January 26, 2016 13:55
Show Gist options
  • Save belackriv/161f1419cfa307a4dc27 to your computer and use it in GitHub Desktop.
Save belackriv/161f1419cfa307a4dc27 to your computer and use it in GitHub Desktop.
'use strict';
import Backbone from 'backbone';
import Radio from 'backbone.radio';
import Marionette from 'marionette';
import MyselfModel from 'lib/common/models/myselfModel';
import UserAccountCollection from 'lib/common/models/userAccountCollection';
import AccountCollection from 'lib/common/models/accountCollection';
export default Marionette.Object.extend({
initialize: function(options){
this.data.myself = new MyselfModel();
this.data.accounts = new AccountCollection();
this.data.userAccounts = new UserAccountCollection();
Radio.channel('data').reply({
'myself': this.getMyself,
'accounts': this.getAccounts,
'userAccounts': this.getUserAccounts,
}, this);
},
data: {
myself: null,
accounts: null,
userAccounts: null,
},
getMyself(){
return this.data.myself;
},
getAccounts(){
return this.data.accounts;
},
getUserAccounts(){
return this.data.userAccounts;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment