mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: test more vweb template features
This commit is contained in:
@@ -2,3 +2,14 @@ Test <b>app</b>
|
||||
<br>
|
||||
<h1>@hello</h1>
|
||||
<hr>
|
||||
@if show
|
||||
show = true
|
||||
@end
|
||||
|
||||
@for number in numbers
|
||||
@number <br>
|
||||
@end
|
||||
|
||||
|
||||
<hr>
|
||||
End.
|
||||
|
@@ -27,8 +27,10 @@ pub fn (mut app App) json_endpoint() {
|
||||
|
||||
pub fn (mut app App) index() {
|
||||
app.cnt++
|
||||
show:= true
|
||||
//app.vweb.text('Hello world from vweb')
|
||||
hello := 'Hello world from vweb'
|
||||
numbers := [1,2,3]
|
||||
$vweb.html()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user