From bf6916f9b7f511cdd21a76839e51a077dd490cf5 Mon Sep 17 00:00:00 2001 From: Gilad Peleg Date: Mon, 14 Apr 2014 17:41:05 +0300 Subject: [PATCH] update readme with ng-template handle --- readme.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index e70aca4..58835b7 100644 --- a/readme.md +++ b/readme.md @@ -1,17 +1,17 @@ # [gulp](https://github.com/wearefractal/gulp)-angular-htmlify -> Change your ng-attributes to data-ng-attributes for html5 validation +> Change your ng-attributes to data-ng-attributes for HTML5 validation [![NPM Version](http://img.shields.io/npm/v/gulp-angular-htmlify.svg)](https://npmjs.org/package/gulp-angular-htmlify) [![NPM Downloads](http://img.shields.io/npm/dm/gulp-angular-htmlify.svg)](https://npmjs.org/package/gulp-angular-htmlify) [![Dependencies](http://img.shields.io/gemnasium/pgilad/gulp-angular-htmlify.svg)](https://gemnasium.com/pgilad/gulp-angular-htmlify) [![Build Status](https://travis-ci.org/pgilad/gulp-angular-htmlify.svg?branch=master)](https://travis-ci.org/pgilad/gulp-angular-htmlify) -Ever tried to run an Angular html page into w3c validator? Yeah it's a mess. +Ever tried to run an Angular HTML page into w3c validator? Yeah it's a mess. The solution everyone recommends is to add `data` to all your `ng` directives. Now with `gulp` this can be easily made part of your build flow, similar to how -ng-min is to creating minfiable Angular syntax. +ng-min is to creating minifiable Angular syntax. **Turn this:** ```html @@ -32,7 +32,7 @@ ng-min is to creating minfiable Angular syntax. ``` #### HTML5 Valid -**gulp-angular-htmlify** can handle the following cases: +**gulp-angular-htmlify** looks for `ng-` directives by default and can handle the following cases: ```html @@ -46,7 +46,9 @@ ng-min is to creating minfiable Angular syntax. ``` -And handles `ng-directives` by default. This behavior can be extended with the option `customPrefixes`. +You can add additional prefixes using the option `customPrefixes`. + +This plugin plays nice with `type="text/ng-template"` and won't break it. ## Install @@ -73,7 +75,7 @@ gulp.task('htmlify', function() { ### htmlify(params) -params is an object that contains the following settings: +`params` is an object that contains the following settings: #### customPrefixes @@ -83,6 +85,8 @@ An array to optionally add custom prefixes to the list of converted directives. For example: `['ui-', 'gijo-']` +By default only `ng-` prefixes are are handled. Any items you add here will be handled as well. + *Note: for this to work - you will need to make sure your directives can load with a `data-` prefix.* Defaults to **[]**