I have written my angularjs application in CJS format and using gulp-systemjs-builder
to bundle them to one file.
I am trying to pipe the output to gulp-ng-annotate
for DI but it fails because systemjs-builder inserts couple of line between the \* @ngInject *\
and function declaration.
Example:
Before Bundle:
/* @ngInject */
function ReportCtrl($scope) {
var _ctrl = this;
}
After Bundle:
/* @ngInject */
var global = this || self,
GLOBAL = global;
function ReportCtrl($scope) {
var _ctrl = this;
}
Can anyone suggest how I can get over this issue?