Sorry if the title is wrong cause i couldn't figure out the best title for it. You can change it if you want to
Constant File
/* global lodash:false */
(function () {
'use strict';
angular
.module('blocks.router')
.constant('lodash', _);
})();
routerHelper.js File
/* @ngInject */
function routeHelper($location, $rootScope, $state, _, logger, routeHelperConfig)
routeHelper.$inject = ['$location', '$rootScope', '$state', '_', 'logger', 'routeHelperConfig'];
Problem
Manually injecting the dependencies works fine.
routeHelper.$inject = ['$location', '$rootScope', '$state', 'lodash', 'logger', 'routeHelperConfig'];
But When i run ng-annotate cmdline (ng-annotate --single_quotes --add routeHelper.js -o routeHelper.js) it creates following
routeHelper.$inject = ['$location', '$rootScope', '$state', '_', 'logger', 'routeHelperConfig'];
You can see the difference with ng-annoate spitting out '_' instead of 'lodash'.
Question
how can i control ng-annoate to not replace the 'lodash' with '_'