mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Merge pull request #21 from pedramphp/patch-1
Added documentation for the <assign> tag.
This commit is contained in:
commit
47286b9ae6
@ -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()" />
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```html
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user