         $rootScope.error = true
         $rootScope.errorMessage = data.detail
 
-    resource.getTaskCards(1, 1).then(onSuccess, onError)
+    tripId = $routeParams.tripId
+    taskId = $routeParams.taskId
+
+    resource.getTaskCards(tripId, taskId).then(onSuccess, onError) if taskId and tripId
     return
 
 CommentController = ($scope)->


    return

CardsController = ($scope, $rootScope, resource)->
    onSuccess = (data) ->
        console.log("SUCCESS", data)
        $scope.loadedCards = data._attrs

module = angular.module("mrfogg.controllers.main", [])
module.controller("MainController", ["$scope", MainController])
module.controller("ContainerController", ["$scope", ContainerController])
module.controller("UserController", ["$scope", "$rootScope", "$routeParams", "resource", UserController])
module.controller("UserListController", ["$scope", "$rootScope", "resource", UserListController])
module.controller("MrLoginController", ["$scope","$rootScope", "$location", "$routeParams", "resource", "$gmAuth", MrLoginController])
module.controller("TripListController", ["$scope", "$rootScope", "resource", TripListController])
module.controller("CardsController", ["$scope", "$rootScope", "resource", "$routeParams", CardsController])
module.controller("CommentController", ["$scope", CommentController])

