Cleanup and formatting.

This commit is contained in:
Alexis Lahouze 2015-11-27 11:31:23 +01:00
parent 1ec6383287
commit add4871527
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,6 @@
*/ */
// vim: set tw=80 ts=2 sw=2 sts=2: // vim: set tw=80 ts=2 sw=2 sts=2:
// The AccountController.
accountantApp accountantApp
.factory("Account", ["$resource", function($resource) { .factory("Account", ["$resource", function($resource) {
@ -64,7 +63,7 @@ accountantApp
}; };
/* /*
* Add an empty account if not already added. * Add an empty account.
*/ */
$scope.add = function() { $scope.add = function() {
var account = new Account({ var account = new Account({

View File

@ -23,6 +23,7 @@ var accountantApp = angular.module("accountantApp", [
]) ])
.config(function($httpProvider, $routeProvider, $locationProvider) { .config(function($httpProvider, $routeProvider, $locationProvider) {
// Define interceptors.
$httpProvider.interceptors.push(function($q, notificationService) { $httpProvider.interceptors.push(function($q, notificationService) {
return { return {
"response": function(response) { "response": function(response) {
@ -41,6 +42,7 @@ var accountantApp = angular.module("accountantApp", [
}; };
}); });
// Defining template and controller in function of route.
$routeProvider.when('/account/:accountId/operations', { $routeProvider.when('/account/:accountId/operations', {
templateUrl: 'static/templates/operations.html', templateUrl: 'static/templates/operations.html',
controller: 'OperationController' controller: 'OperationController'
@ -54,6 +56,7 @@ var accountantApp = angular.module("accountantApp", [
redirectTo: 'accounts' redirectTo: 'accounts'
}); });
// Enable HTML5 mode.
$locationProvider.html5Mode(true); $locationProvider.html5Mode(true);
}) })