amichai amichai - 1 year ago 83
AngularJS Question

angular.module config using min.js files

I want to configure my angular module like this:

var app = angular.module('myModule', []).config(function ($sceDelegateProvider) {

But when I minify the js file the
parameter is being convert to shorter name.

I didnt find a way to pass the parameter name as a string. (like it is in the module constructor)


Answer Source

Instead of passing a function into config, pass an array where the first variables are the parameter names as string and the last one is the function:

var app = angular.module('myModule', []).config(['$sceDelegateProvider' , function ($sceDelegateProvider) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download