2013-08-29 02:08:59 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
2013-08-30 00:18:39 +00:00
|
|
|
habitrpg
|
|
|
|
|
|
|
|
|
|
.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', '$location',
|
|
|
|
|
function($scope, $rootScope, Groups) {
|
2013-08-31 21:47:03 +00:00
|
|
|
$scope.groups = Groups.query(function(groups){
|
|
|
|
|
$scope.members = groups.members;
|
|
|
|
|
});
|
2013-08-30 00:18:39 +00:00
|
|
|
$scope.party = true;
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
.controller("GuildsCtrl", ['$scope', 'Groups',
|
|
|
|
|
function($scope, Groups) {
|
|
|
|
|
$scope.type = 'guild';
|
|
|
|
|
$scope.text = 'Guild';
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
.controller("PartyCtrl", ['$scope', 'Groups',
|
|
|
|
|
function($scope, Groups) {
|
|
|
|
|
$scope.type = 'party';
|
|
|
|
|
$scope.text = 'Party';
|
|
|
|
|
Groups.query(function(groups){
|
|
|
|
|
$scope.group = groups.party;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
.controller("TavernCtrl", ['$scope', 'Groups',
|
|
|
|
|
function($scope, Groups) {
|
|
|
|
|
//FIXME make sure this query is only called once for all these controllers! If not, let's memoize groups at groupServices level
|
|
|
|
|
Groups.query(function(groups){
|
|
|
|
|
$scope.group = groups.tavern;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
])
|