Created
January 26, 2016 13:55
-
-
Save belackriv/161f1419cfa307a4dc27 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
'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