Skip to content

Commit

Permalink
minifai対策を施した #8
Browse files Browse the repository at this point in the history
  • Loading branch information
sinmetal committed May 24, 2013
1 parent 2ea2511 commit 5146ef6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
var app = angular.module('sample', ['ngResource']).
config(function($routeProvider) {
$routeProvider.
when('/', {controller:ListController, templateUrl:'list.html'}).
when('/entry', {controller:EntryController, templateUrl:'entry.html'});
when('/', {controller:'ListController', templateUrl:'list.html'}).
when('/entry', {controller:'EntryController', templateUrl:'entry.html'});
});

function ListController($scope, $resource) {
app.controller('ListController', ['$scope', '$resource', function($scope, $resource) {
var Store = $resource("/store");
$scope.stores = Store.query(function() {
console.log("success store query");
}, function(){
console.log("error store query");
});
}
}]);

function EntryController($scope, $location, $resource){
app.controller('EntryController', ['$scope', '$location', '$resource', function($scope, $location, $resource) {
$scope.categories = [{"id" : "1", "name" : "野菜"}];
var List = $resource("/item/list");
var Store = $resource("/store");
Expand All @@ -26,7 +26,7 @@
}, function(){
console.log("error list");
});
};
}

$scope.submit = function($event) {
console.log($scope.entryForm);
Expand All @@ -37,5 +37,5 @@
console.log("error entry");
});
};
}
}]);
})();

0 comments on commit 5146ef6

Please sign in to comment.