From d25975438ae085a526bde9ed2cecd52939f8a787 Mon Sep 17 00:00:00 2001 From: Izhaki Date: Thu, 3 Jul 2014 17:24:49 +0100 Subject: [PATCH] docs($compile): fix template and replace properties' docs Closes #8062 --- src/ng/compile.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 93803a8d..dfe0da1d 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -233,14 +233,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 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` @@ -255,11 +257,14 @@ * * * #### `replace` ([*DEPRECATED*!], will be removed in next major release) - * specify where the template should be inserted. Defaults to `false`. + * specify what the template should replace. Defaults to `false`. * - * * `true` - the template will replace the current element. - * * `false` - the template will replace the contents of the current element. + * * `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.