Q:

ui-router minification of templateUrl?

I have this code:
.config(
['$locationProvider', '$sceDelegateProvider', '$sceProvider', '$stateProvider', function ($locationProvider, $sceDelegateProvider, $sceProvider, $stateProvider) {

    var access = {
        name: 'access',
        url: '/Access/:content',
        templateUrl: ['$stateParams', function ($stateParams) {
            var x = $stateParams;
            var page = 'app/access/partials/' + $stateParams.content + '.html';
            return page;
        }]
    };

I did what I thought was needed to make this work when minified but it seems like AngularJS is unable to resolve $stateParams. 
Has anyone come across a similar problem?

A:

templateUrl property accepts a string or a function, and the function only accepts a single parameter, which is toParams - it does not support injectable parameters. 
In your case, assign the function directly without the array:
.state("access", {
   // ...
   templateUrl: function(toParams){
      var page = 'app/access/partials/' + toParams.content + '.html';
      return page;
   }
});

