W
W
Wasya UK2017-04-04 20:25:16
HTML
Wasya UK, 2017-04-04 20:25:16

How to write attribute without parameter in Pug (Jade)?

When I write nav.dropdown.menu(data-dropdown-menu) :

<nav class="dropdown menu" data-dropdown-menu="data-dropdown-menu" role="menubar">
How to make an output like this: Thanks in advance
<nav class="dropdown menu" data-dropdown-menu>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alvvi, 2017-04-04
@alvvi

Specify doctype htmlat the beginning of the file.

B
bob_cody, 2017-04-05
@bob_cody

No way.
Maximum, you can deduce like this: But why? And doctype has nothing to do with it. An implementation like the one you want works with attributes of type boolean , but data attributes are not - they are designed to store some kind of information.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question