Fixes for minification of controllers.
This commit is contained in:
parent
76233fec2a
commit
ecd21e050b
|
@ -11,9 +11,9 @@
|
||||||
// TODO Make this a bit more AngularJS module looking...
|
// TODO Make this a bit more AngularJS module looking...
|
||||||
|
|
||||||
// Controls the task list.
|
// Controls the task list.
|
||||||
TaskListController.$inject = ['$scope', 'Task'];
|
rookeriesApp.controller(
|
||||||
|
"TaskListController", ['$scope', 'Task', function ($scope, Task) {
|
||||||
|
|
||||||
function TaskListController($scope, Task) {
|
|
||||||
$scope.tasks = Task.query();
|
$scope.tasks = Task.query();
|
||||||
$scope.orderProp = 'id';
|
$scope.orderProp = 'id';
|
||||||
|
|
||||||
|
@ -21,21 +21,23 @@ function TaskListController($scope, Task) {
|
||||||
$scope.popup = function(task) {
|
$scope.popup = function(task) {
|
||||||
alert("I am task #" + task.id);
|
alert("I am task #" + task.id);
|
||||||
}
|
}
|
||||||
}
|
}]);
|
||||||
|
|
||||||
// Control the detailed view of a task.
|
// Control the detailed view of a task.
|
||||||
TaskDetailController.$inject = ['$scope', '$routeParams', 'Task'];
|
rookeriesApp.controller(
|
||||||
|
"TaskDetailController", ['$scope', '$stateParams', 'Task', function ($scope, $stateParams, Task) {
|
||||||
|
|
||||||
function TaskDetailController($scope, $stateParams, Task) {
|
|
||||||
$scope.task = Task.get(
|
$scope.task = Task.get(
|
||||||
{taskId: $stateParams.taskId}, function($scope, $stateParams, task) {
|
{taskId: $stateParams.taskId}, function($scope, $stateParams, task) {
|
||||||
|
|
||||||
$scope.task = task.task;
|
$scope.task = task.task;
|
||||||
$scope.id = $stateParams.taskId;
|
$scope.id = $stateParams.taskId;
|
||||||
});
|
});
|
||||||
}
|
}]);
|
||||||
|
|
||||||
// TODO Clean up experimental code...
|
// TODO Clean up experimental code...
|
||||||
ModalDemoCtrl = function ($scope) {
|
rookeriesApp.controller(
|
||||||
|
"ModalDemoCtrl", ["$scope", function ($scope) {
|
||||||
|
|
||||||
$scope.open = function () {
|
$scope.open = function () {
|
||||||
$scope.shouldBeOpen = true;
|
$scope.shouldBeOpen = true;
|
||||||
|
@ -52,22 +54,21 @@ ModalDemoCtrl = function ($scope) {
|
||||||
backdropFade: true,
|
backdropFade: true,
|
||||||
dialogFade:true
|
dialogFade:true
|
||||||
};
|
};
|
||||||
|
}]);
|
||||||
};
|
|
||||||
|
|
||||||
// Setup of document pages.
|
// Setup of document pages.
|
||||||
DocPageController.$inject = ['$scope', '$stateParams', 'DocPage'];
|
rookeriesApp.controller(
|
||||||
function DocPageController($scope, $stateParams, DocPage) {
|
"DocPageController", ['$scope', '$stateParams', 'DocPage', function ($scope, $stateParams, DocPage) {
|
||||||
|
|
||||||
// $scope.docPage = $stateParams;
|
|
||||||
$scope.docPage = DocPage.get({page: $stateParams.page});
|
$scope.docPage = DocPage.get({page: $stateParams.page});
|
||||||
}
|
|
||||||
|
|
||||||
SwitchThemeCtrl.$inject = ['$scope'];
|
}]);
|
||||||
|
|
||||||
// Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input
|
|
||||||
// Toggle between themes.
|
// Toggle between themes.
|
||||||
function SwitchThemeCtrl($scope) {
|
// Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input
|
||||||
|
rookeriesApp.controller(
|
||||||
|
|
||||||
|
"SwitchThemeCtrl", ['$scope', function ($scope) {
|
||||||
|
|
||||||
// TODO Consider having an array of themes and switching to the next with a faux-pointer?
|
// TODO Consider having an array of themes and switching to the next with a faux-pointer?
|
||||||
// TODO Turn the user preferences into a nice model.
|
// TODO Turn the user preferences into a nice model.
|
||||||
|
@ -88,9 +89,7 @@ function SwitchThemeCtrl($scope) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//function NavMenuCtrl($scope, DocPage) {
|
//function NavMenuCtrl($scope, DocPage) {
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue