mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb.tmpl: update README.md with @js directive (#7791)
This commit is contained in:
parent
a8e4d1df40
commit
ea4981df90
@ -109,6 +109,19 @@ Project root
|
|||||||
> Note that there shouldn't be a file suffix,
|
> Note that there shouldn't be a file suffix,
|
||||||
it is automatically appended and only allows `html` files.
|
it is automatically appended and only allows `html` files.
|
||||||
|
|
||||||
|
|
||||||
|
## js
|
||||||
|
The js directive consists of two parts, the `@js` tag and `'<path>'` string,
|
||||||
|
where you can insert your src
|
||||||
|
```
|
||||||
|
@js '<url>'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```html
|
||||||
|
@js 'myscripts.js'
|
||||||
|
```
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
All variables which are declared before can be used through the `@{my_var}` syntax.
|
All variables which are declared before can be used through the `@{my_var}` syntax.
|
||||||
It's also possible to use properties of structs here like `@{my_struct.prop}`.
|
It's also possible to use properties of structs here like `@{my_struct.prop}`.
|
||||||
|
Loading…
Reference in New Issue
Block a user