progress on the structure of this little app

This commit is contained in:
Noah Levitt 2015-09-25 22:19:29 +00:00
parent 51732d0d49
commit 05e15b9667
7 changed files with 114 additions and 80 deletions

View file

@ -0,0 +1,21 @@
"use strict";
var brozzlerControllers = angular.module("brozzlerControllers", []);
brozzlerControllers.controller("JobsListController", ["$scope", "$http",
function($scope, $http) {
$http.get("api/jobs").success(function(data) {
console.log(data);
$scope.jobs = data.jobs;
});
}]);
brozzlerControllers.controller("JobController", ["$scope", "$routeParams", "$http",
function($scope, $routeParams, $http) {
$scope.phoneId = $routeParams.phoneId;
$http.get("api/jobs/" + $routeParams.id).success(function(data) {
console.log(data);
$scope.job = data;
});
}]);