From 4c68705fcee7e8094a30f82b04a39ebe8b38ac38 Mon Sep 17 00:00:00 2001 From: Izhaki Date: Thu, 3 Jul 2014 17:24:49 +0100 Subject: [PATCH 1/2] Fix docs for template and replace properties See issue #8062 --- src/ng/compile.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 7e3364d97ac4..1277cdf2e0ff 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -226,14 +226,16 @@ * If no `type` is specified, then the type is considered to be html. * * #### `template` - * replace the current element with the contents of the HTML. The replacement process - * migrates all of the attributes / classes from the old element to the new one. See the - * {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive - * Directives Guide} for an example. + * HTML with angular markup that may: + * * Replace the contents of the directive's element (defualt). + * * Replace the directive's element itself (if `replace` is true - DEPRECATED). + * * Wrap the contents of the directive's element (if `transclude` is true). * - * You can specify `template` as a string representing the template or as a function which takes - * two arguments `tElement` and `tAttrs` (described in the `compile` function api below) and - * returns a string value representing the template. + * Value may be: + * + * * A string. For example `
{{delete_str}}
`. + * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` + * function api below) and returns a string value. * * * #### `templateUrl` @@ -248,11 +250,14 @@ * * * #### `replace` ([*DEPRECATED*!], will be removed in next major release) - * specify where the template should be inserted. Defaults to `false`. - * - * * `true` - the template will replace the current element. - * * `false` - the template will replace the contents of the current element. + * specify what the template should replace. Defaults to `false`. * + * * `true` - the template will replace the directive's element. + * * `false` - the template will replace the contents of the directive's element. + * + * The replacement process migrates all of the attributes / classes from the old element to the new + * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive + * Directives Guide} for an example. * * #### `transclude` * compile the content of the element and make it available to the directive. From 2e85e79b61fca854e19e0db3f07bbf02a522f799 Mon Sep 17 00:00:00 2001 From: Izhaki Date: Fri, 4 Jul 2014 00:05:49 +0100 Subject: [PATCH 2/2] Fixed style errors reported by Travis --- src/ng/compile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 1277cdf2e0ff..fe5df4bf112e 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -226,15 +226,15 @@ * If no `type` is specified, then the type is considered to be html. * * #### `template` - * HTML with angular markup that may: + * HTML markup that may: * * Replace the contents of the directive's element (defualt). * * Replace the directive's element itself (if `replace` is true - DEPRECATED). * * Wrap the contents of the directive's element (if `transclude` is true). * * Value may be: - * + * * * A string. For example `
{{delete_str}}
`. - * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` + * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` * function api below) and returns a string value. * * @@ -254,7 +254,7 @@ * * * `true` - the template will replace the directive's element. * * `false` - the template will replace the contents of the directive's element. - * + * * The replacement process migrates all of the attributes / classes from the old element to the new * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive * Directives Guide} for an example.