jade template engine a href tag with button

Viewed 15136

How can I link a button in jade template? I am trying to generate the HTML

<a href="create"><button type="button">create new post</button></a>

I tried

a(href="create") button "create new post"

which results in

<a href="create">button "create new post"</a>

If I change it to

a(href="create")button "create new post"

I get the error

logJs\views\posts\update.jade:7 5| block content 6| h1='creating new post' > 7| a(href="create")button "hello word" 8| form(name="add-post",method="post") 9| div.input 10| span.label title Unexpected token `tag` expected `text`, `code`, `:`, `newline` or `eos`
2 Answers
Related