Lexer changes:
- Support quoted attribute names: '(click)'='play()' or "(click)"="play()"
- Support parenthesized attribute names: (click)='play()' (Angular/Vue event bindings)
Build templates changes:
- Object literals for style attribute converted to CSS: {color: 'red'} -> color:red;
- Object literals for other attributes: extract values as space-separated
- Array literals converted to space-separated: ['foo', 'bar'] -> foo bar
37 lines
673 B
Plaintext
37 lines
673 B
Plaintext
extends layout.pug
|
|
|
|
block scripts
|
|
script(src='/jquery.js')
|
|
script(src='/pets.js')
|
|
|
|
block content
|
|
h1= title
|
|
p Welcome to the pets page!
|
|
ul
|
|
li Cat
|
|
li Dog
|
|
ul
|
|
each val in items
|
|
li= val
|
|
input(data-json=`
|
|
{
|
|
"very-long": "piece of ",
|
|
"data": true
|
|
}
|
|
`)
|
|
|
|
br
|
|
div(class='div-class', (click)='play()') one
|
|
div(class='div-class' '(click)'='play()') two
|
|
a(style={color: 'red', background: 'green'}) sdfsdfs
|
|
a.button btn
|
|
br
|
|
|
|
form(method="post")
|
|
+input_text("firstName", "First Name", "first name")
|
|
br
|
|
+input_text("lastName", "Last Name", "last name")
|
|
submit sumit
|
|
if error
|
|
+alert_error(error)
|