Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to detect and minify controller inside a controller? #65

Closed
rabishah opened this issue Jan 2, 2014 · 2 comments
Closed

Comments

@rabishah
Copy link

rabishah commented Jan 2, 2014

For example, I've been using angular bootstrap ui. Here is my controller,

angular.module('myApp').controller('HomeCtrl', function($scope, $modal) {

    // My inner controller
    var ModalCtrl = function($scope, $modalInstance, event) {
        ....
     });

     $modal.open({
          ....
          controller : ModalCtrl
     });
});

Now when i use grunt to minify this piece of code, its not able to add annotation injection for the inner controller.

@AdrienGiboire
Copy link

I think I have the same problem but in a more general way. I mean, I have this piece of code:

(function () {
  'use strict';
  app.controller('MainCtrl', function (SelectedFacets, cookieStore, $modal, SETTINGS, Document, Navigation, Search, ViewConfiguration, $timeout, $rootScope, $scope, $routeParams, $window, $location, $filter) {
  };
})();

And it does not get ngminified. I think it worked before I add the closures.

@eddiemonge
Copy link
Collaborator

Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93

If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues

If you really want ngmin to fix this issue, feel free to fork it and use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants