From e27424c41e244a16b48bff63c72506ebef86423e Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 27 Dec 2014 12:39:29 +0530 Subject: [PATCH] Fix: SubControllers not working due to breaking changes in AngularJS 1.3 where global functions as controllers are no longer allowed. Overrode the setting with allowGlobals() config. --- brewman/static/scripts/employee-attendance.js | 2 +- brewman/static/scripts/overlord.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/brewman/static/scripts/employee-attendance.js b/brewman/static/scripts/employee-attendance.js index 72d0db55..bcafee03 100644 --- a/brewman/static/scripts/employee-attendance.js +++ b/brewman/static/scripts/employee-attendance.js @@ -52,7 +52,7 @@ var EmployeeAttendanceSubController = ['$scope', function ($scope) { }; $scope.isDirty = function () { - return !angular.equals($scope.original, $scope.item) + return !angular.equals($scope.original, $scope.item); }; }]; EmployeeAttendanceController.resolve = { diff --git a/brewman/static/scripts/overlord.js b/brewman/static/scripts/overlord.js index 189451f8..853f4a02 100644 --- a/brewman/static/scripts/overlord.js +++ b/brewman/static/scripts/overlord.js @@ -113,6 +113,9 @@ var overlord = angular.module('overlord', ['overlord.directive', 'overlord.filte .config(['$httpProvider', function ($httpProvider) { $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; }]) + .config(['$controllerProvider', function ($controllerProvider) { + $controllerProvider.allowGlobals(); + }]) .config(['$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push('responseInterceptor'); }])