mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Support documentation for <assign> tag.
This commit is contained in:
parent
bc3cc17137
commit
4ac18760c1
@ -642,6 +642,12 @@ Input data passed to a template is made available using a special `data` variabl
|
|||||||
<var name="name" value="data.name.toUpperCase()" />
|
<var name="name" value="data.name.toUpperCase()" />
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To reassigne an existing variable with a new value always use the `<assign>` tag. For example:
|
||||||
|
```html
|
||||||
|
<assign var="name" value="data.lastname" />
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
The `<with>` directive can be used to create scoped variables as shown in the following sample code:
|
The `<with>` directive can be used to create scoped variables as shown in the following sample code:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user