gulp-angular-htmlify

Change your ng-attributes to data-ng-attributes for HTML5 validation

gulp-angular-htmlify

Change your ng-attributes to data-ng-attributes for HTML5 validation using angular-html5

Issues with the output should be reported on the angular-html5 issue tracker.

Install with npm

npm install --save-dev gulp-angular-htmlify
var gulp = require('gulp');
var htmlify = require('gulp-angular-htmlify');
 
//simple usage 
gulp.task('htmlify', function() {
    gulp.src('public/**/*.html')
        .pipe(htmlify())
        .pipe(gulp.dest('build/'));
});
 
//using jade as a pre-processer 
gulp.task('htmlify', function() {
    gulp.src('partials/**/*.jade')
        .pipe(jade())
        .pipe(htmlify())
        .pipe(gulp.dest('build/'));
});
 
//Also transforming ui-attributes to data-ui-attributes 
gulp.task('htmlify', function() {
    gulp.src('public/**/*.html')
        .pipe(htmlify({
            customPrefixes: ['ui-']
        }))
        .pipe(gulp.dest('build/'));
});

See the angular-html5 options

Type: Boolean

Default: false

Whether to log files that had ng-directives detected and replaced. (Useful for debugging).

Example usage:

//... 
.pipe(htmlify({
    verbose: true
    }))
// --> [gulp] Found and replaced ng-directives in index.html 
//... 

MIT @Gilad Peleg