challenges: back to dealing with taskLists from scopes, rather than the

habitrpg-tasks directive. Was having trouble accessing it by reference
otherwise. Would love to move off of the directive entirely and use
ng-include instead, but some scope issues with lists
This commit is contained in:
Tyler Renelle
2013-10-29 19:07:39 -07:00
parent 02ebc536ca
commit 6e71a76e22
7 changed files with 37 additions and 45 deletions

View File

@@ -115,18 +115,12 @@ window.habitrpg = angular.module('habitrpg',
.state('options.challenges.detail', {
url: '/:cid',
templateUrl: 'partials/options.challenges.detail.html',
// resolve: {
// challenge: ['$scope', 'Challenges', '$stateParams', '$q',
// function($scope, Challenges, $stateParams, $q){
// // FIXME does ui-router not work with ng-resource by default?
// var challenge = $q.defer();
// Challenges.Challenge.get({cid:$stateParams.cid}, function(_challenge){
// challenge._locked = true;
// challenge.resolve(_challenge);
// });
// return challenge.promise;
// }]
// }
controller: ['$scope', 'Challenges', '$stateParams',
function($scope, Challenges, $stateParams){
$scope.obj = $scope.challenge = Challenges.Challenge.get({cid:$stateParams.cid}, function(){
$scope.challenge._locked = true;
});
}]
})
// Options > Settings