mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user