I have below service code
(function () {
'use strict';
angular.module('App')
.factory('apiservice', apiservice);
/* @ngInject */
function apiservice($http) {
var service = {
getData: getGridData,
};
return service;
//code ommitted for clarity
}
})();
When I minifying and bundling, the dependency is getting screwed up. So I wanted to change $scope to '$scope' so minifier won't mess up with name.
I know there are several ways to do it. But can I make it work like below:
(function () {
'use strict';
angular.module('App')
.factory('apiservice', ['http', apiservice]);
function apiservice($http) {
return service;
}
})();
Any help is appreciated.