When making the distribution files for deploy my application I get an an error after the minification "Uncaught TypeError: Cannot read property 'redirectDefinition' of undefined" on app.js
and
"Uncaught TypeError: Cannot read property 'annotate' of undefined" on vendor.js
Here is my index before minification
<!-- build:js scripts/vendor.js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<!-- endbuild -->
<!-- build:js scripts/ui.js -->
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="bower_components/jquery-spinner/dist/jquery.spinner.min.js"></script>
<script src="bower_components/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js"></script>
<script src="bower_components/jquery-steps/build/jquery.steps.min.js"></script>
<script src="bower_components/toastr/toastr.min.js"></script>
<script src="bower_components/bootstrap-file-input/bootstrap.file-input.js"></script>
<script src="bower_components/jquery.slimscroll/jquery.slimscroll.min.js"></script>
<script src="bower_components/holderjs/holder.js"></script>
<script src="bower_components/raphael/raphael-min.js"></script>
<script src="bower_components/morris.js/morris.js"></script>
<script src="scripts/vendors/jquery.sparkline.min.js"></script>
<script src="bower_components/flot/jquery.flot.js"></script>
<script src="bower_components/flot/jquery.flot.resize.js"></script>
<script src="bower_components/flot/jquery.flot.pie.js"></script>
<script src="bower_components/flot/jquery.flot.stack.js"></script>
<script src="bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
<script src="bower_components/flot/jquery.flot.time.js"></script>
<script src="bower_components/gauge.js/dist/gauge.min.js"></script>
<script src="bower_components/jquery.easy-pie-chart/dist/angular.easypiechart.min.js"></script>
<script src="bower_components/angular-wizard/dist/angular-wizard.min.js"></script>
<script src="bower_components/textAngular/dist/textAngular-rangy.min.js"></script>
<script src="bower_components/textAngular/dist/textAngular-sanitize.min.js"></script>
<script src="bower_components/textAngular/dist/textAngular.min.js"></script>
<script src="bower_components/angular-local-storage/dist/angular-local-storage.min.js"></script>
<script src="scripts/vendors/skycons.js"></script>
<script src="bower_components/angular-loading-bar/build/loading-bar.min.js"></script>
<!-- endbuild -->
<!-- build:js({.tmp,client}) scripts/app.js -->
<script src="scripts/app.js"></script>
<script src="scripts/shared/main.js"></script>
<script src="scripts/shared/directives.js"></script>
<script src="scripts/shared/localize.js"></script>
<script src="scripts/UI/UICtrl.js"></script>
<script src="scripts/UI/UIDirective.js"></script>
<script src="scripts/UI/UIService.js"></script>
<script src="scripts/Form/FormDirective.js"></script>
<script src="scripts/Form/FormCtrl.js"></script>
<script src="scripts/Form/FormValidation.js"></script>
<script src="scripts/Table/TableCtrl.js"></script>
<script src="scripts/Task/Task.js"></script>
<script src="scripts/Chart/ChartCtrl.js"></script>
<script src="scripts/Auth/authCtrl.js"></script>
<script src="scripts/Auth/authService.js"></script>
<script src="scripts/Chart/ChartDirective.js"></script>
<script src="scripts/FormCreator/formCreatorCtrl.js"></script>
<script src="scripts/FormCreator/formCreatorService.js"></script>
<script src="scripts/FormCreator/formCreatorDirective.js"></script>
after the minification I get this 3 files
<script src="scripts/vendor.js"></script>
<script src="scripts/ui.js"></script>
<script src="scripts/app.js"></script>
where all vendor goes to vendor.js , all my code goes to UI.js and the code for angular and boostrap etc goes in app.js.
it all stop working after I created the 3 files
<script src="scripts/Auth/authCtrl.js"></script>
<script src="scripts/Auth/authService.js"></script>
<script src="scripts/Chart/ChartDirective.js"></script>
Here is the code for the controllers and the service
// Generated by CoffeeScript 1.9.0
'use strict';
angular.module('app.auth.ctrls', []).controller('loginController', [
'$scope', '$location', 'authService', function($scope, $location, authService) {
$scope.loginData = {
userName: '',
password: ''
};
$scope.message = '';
authService.logOut();
$scope.login = function() {
authService.login($scope.loginData).then((function(response) {
$location.path('/dashboard');
}), function(err) {
$scope.message = err.error_description;
});
};
}
]).controller('signupController', [
'$scope', '$location', '$timeout', 'authService', function($scope, $location, $timeout, authService) {
var startTimer;
$scope.savedSuccessfully = false;
$scope.message = '';
$scope.registration = {
userName: '',
password: '',
confirmPassword: ''
};
$scope.signUp = function() {
authService.saveRegistration($scope.registration).then((function(response) {
$scope.savedSuccessfully = true;
$scope.message = 'User has been registered successfully, you will be redicted to login page in 2 seconds.';
startTimer();
}), function(response) {
var errors, i, key;
errors = [];
for (key in response.data.modelState) {
i = 0;
while (i < response.data.modelState[key].length) {
errors.push(response.data.modelState[key][i]);
i++;
}
}
$scope.message = 'Failed to register user due to:' + errors.join(' ');
});
};
startTimer = function() {
var timer;
timer = $timeout((function() {
$timeout.cancel(timer);
$location.path('/login');
}), 2000);
};
}
]);
services
// Generated by CoffeeScript 1.9.0
'use strict';
angular.module('app.auth.services', []).factory('authService', [
'$http', '$q', 'localStorageService', '$window', function($http, $q, localStorageService, $window) {
var authServiceFactory, serviceBase, _authentication, _fillAuthData, _logOut, _login, _saveRegistration;
serviceBase = 'https://tools.brandinstitute.com/biwebservices/';
authServiceFactory = {};
_authentication = {
isAuth: false,
userName: ''
};
_saveRegistration = function(registration) {
_logOut();
return $http.post(serviceBase + 'api/account/register', registration).then(function(response) {
return response;
});
};
_login = function(loginData) {
var data, deferred;
data = 'grant_type=password&username=' + loginData.userName + '&password=' + loginData.password;
deferred = $q.defer();
$http.post(serviceBase + 'token', data, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).success(function(response) {
localStorageService.set('authorizationData', {
token: response.access_token,
userName: loginData.userName
});
_authentication.isAuth = true;
_authentication.userName = loginData.userName;
deferred.resolve(response);
}).error(function(err, status) {
_logOut();
deferred.reject(err);
});
return deferred.promise;
};
_logOut = function() {
localStorageService.remove('authorizationData');
_authentication.isAuth = false;
_authentication.userName = '';
};
_fillAuthData = function() {
var authData;
authData = localStorageService.get('authorizationData');
if (authData) {
_authentication.isAuth = true;
_authentication.userName = authData.userName;
}
};
authServiceFactory.saveRegistration = _saveRegistration;
authServiceFactory.login = _login;
authServiceFactory.logOut = _logOut;
authServiceFactory.fillAuthData = _fillAuthData;
authServiceFactory.authentication = _authentication;
return authServiceFactory;
}
]).factory('ordersService', [
'$http', function($http) {
var ordersServiceFactory, serviceBase, _getOrders;
serviceBase = 'http://ngauthenticationapi.azurewebsites.net/';
ordersServiceFactory = {};
_getOrders = function() {
return $http.get(serviceBase + 'api/orders').then(function(results) {
return results;
});
};
ordersServiceFactory.getOrders = _getOrders;
return ordersServiceFactory;
}
]).factory('authInterceptorService', [
'$q', '$location', 'localStorageService', function($q, $location, localStorageService) {
var authInterceptorServiceFactory, _request, _responseError;
authInterceptorServiceFactory = {};
_request = function(config) {
var authData;
config.headers = config.headers || {};
authData = localStorageService.get('authorizationData');
if (authData) {
config.headers.Authorization = 'Bearer ' + authData.token;
}
return config;
};
_responseError = function(rejection) {
if (rejection.status === 401) {
$location.path('/login');
}
return $q.reject(rejection);
};
authInterceptorServiceFactory.request = _request;
authInterceptorServiceFactory.responseError = _responseError;
return authInterceptorServiceFactory;
}
]);
How can I fix this?
thanks for your help in advance