Closed michaeljoser closed 9 years ago
@michaeljoser Yes, I just ran into this issue the other day (on a different project), that when I minify something, Angular doesn't inject stuff properly. For now, the only workaround that I know of is to include the non minified version of the JS file in your app (aka src/angular-drupal.js
).
Do you know of a way to minify things and have the dependency injection work properly?
minify-ing did work actually sorry... was a stupid typo on my part. working all fine :)
sample of my gulp file below:
gulp.task('minify-js', function() {
gulp.src([
'client/components/underscore/underscore-min.js',
'client/components/angular/angular.min.js',
'client/components/angular-drupal/src/angular-drupal.js',
'client/js/routingConfig.js',
'client/js/app.js',
'client/js/services.js',
'client/js/controllers/*.js',
'client/js/filters.js',
'client/js/directives.js'
])
.pipe(concat('app.min.js'))
.pipe(ngAnnotate())
.pipe(uglify({mangle: true}))
.pipe(gulp.dest('client/dist/'));
});
Hello, Loving your module but i can't seem to get it to play nicely with my gulp file. I am using ng-annotate but no success... any advice for me please?