angularjs - ngInject and closure compiler -
I try to compile the following code in the advanced mode incorrectly:
/ ** * @Description App Configuration * @Veram {! Kajal. $ Route provider} $ route provider * @constructor * @ngInject * / function Config ($ routeProvider) {$ routeProvider. When ('/', {templateUrl: 'mainpage / mainpage.html', administrator: 'MainpageCtrl'}). When ('/ viewer', {templateUrl: 'viewer / viewer,', controller: 'viewerkeletal'}). Otherwise ({redirectTo: '/'}); }
Is there any special flag on?
If I add the following line then it works, but I want to take advantage of ngInet.
config ['$ inject'] = ['$ routeProvider'];
thanks
Closing compiler with the "--angular_pass" flag .
Comments
Post a Comment