docs(cheatsheet): Document SVG idiosyncrasies (#6055)

This commit is contained in:
Kai Ruhnau 2016-05-19 19:20:08 +02:00 committed by Miško Hevery
parent 6e62217b78
commit a88b887a05
1 changed files with 14 additions and 0 deletions

View File

@ -78,3 +78,17 @@ syntax:
`<p>Employer: {{employer?.companyName}}</p>`|`{{employer?.companyName}}`
description:
The safe navigation operator (`?`) means that the `employer` field is optional and if `undefined`, the rest of the expression should be ignored.
@cheatsheetItem
syntax:
`<svg:rect x="0" y="0" width="100" height="100"/>`|`svg:`
description:
SVG snippet templates need an `svg:` prefix on their root element to disambiguate the SVG element from an HTML component.
@cheatsheetItem
syntax:
`<svg>
<rect x="0" y="0" width="100" height="100"/>
</svg>`|`svg`
description:
`<svg>` root elements are detected as SVG element automatically without the prefix