I'm trying to minify my AngularJS JavaScript (using SquishIt).
My module has an injected service as a function argument, like so.
var myapp = angular.module('myapp', ['ngSanitize'], function ($routeProvider) {
...
The problem is when I come to minify the code, $routeProvider
become something like n
and then AngularJS can't understand it.
I've done something similar with my controller which I think works
myapp.controller('MyAppController', ['$scope', '$routeParams', '$filter', 'storage', function ($scope, $routeParams, $filter, storage) { ... }]);
But can't seem to make it work for my module.
Forget it. Figured it out! Very similar to how I achieved the controller, I was just getting overloaded with brackets...
var myapp = angular.module('myapp',
['ngSanitize'],
['$routeProvider', function ($routeProvider) { ... }]);