btford/ngmin

Recognize controllers in variables

Anahkiasen opened this issue · 0 comments

Currently this is not recognized:

var Controller = function($scope) {
};

angular.module('foobar').controller('Controller', Controller);

The issue has been raised before and was closed stating there was no benefit to declaring controllers in a variable but this is the only way to work with ng-controller as the latter searchs resolves the expression directly (ie. looks for a variable or function) instead of looking into declared modules.