Skip to content

Commit

Permalink
docs(@angular-devkit/schematics): properly escape code in Templating …
Browse files Browse the repository at this point in the history
…quick reference

(cherry picked from commit dcbfe5c)
  • Loading branch information
LucaVazz authored and alan-agius4 committed May 19, 2021
1 parent c0b6a5d commit 6eb3ed2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/angular_devkit/schematics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,19 @@ The system operates on placeholders defined inside files or their paths as loade

## Path Templating

| Placeholder | Description |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **variable** | Replaced with the value of `variable`. |
| **variable@function** | Replaced with the result of the call `function(variable)`. Can be chained to the left (`__variable@function1@function2__ ` etc). |
| Placeholder | Description |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `__variable__` | Replaced with the value of `variable`. |
| `__variable@function__` | Replaced with the result of the call `function(variable)`. Can be chained to the left (`__variable@function1@function2__ ` etc). |

## Content Templating

| Placeholder | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| <%= expression %> | Replaced with the result of the call of the given expression. This only supports direct expressions, no structural (for/if/...) JavaScript. |
| <%- expression %> | Same as above, but the value of the result will be escaped for HTML when inserted (i.e. replacing '<' with '&lt;') |
| <% inline code %> | Inserts the given code into the template structure, allowing to insert structural JavaScript. |
| <%# text %> | A comment, which gets entirely dropped. |
| Placeholder | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `<%= expression %>` | Replaced with the result of the call of the given expression. This only supports direct expressions, no structural (for/if/...) JavaScript. |
| `<%- expression %>` | Same as above, but the value of the result will be escaped for HTML when inserted (i.e. replacing '<' with '&lt;') |
| `<% inline code %>` | Inserts the given code into the template structure, allowing to insert structural JavaScript. |
| `<%# text %>` | A comment, which gets entirely dropped. |

# Examples

Expand Down

0 comments on commit 6eb3ed2

Please sign in to comment.