Angular Directive in Jade

I have an AngularJS directive and is called in the Jade Template with:

input(auto-complete, ui-items='merchants.name', ng-model='selected')

I need to have it auto-completeas it is (unsigned =), but it displays as

<input class="ng-pristine ng-valid" ng-model="selected" ui-items="merchants.name" auto-complete="auto-complete">

How can i delete ="auto-complete"?

+4
source share
2 answers

quoted How to add an attribute without a value?

I found that null removes the attribute and an empty string gives the desired result. So script (src = "/ javascripts / angular -0.9.19.js", ng: autobind = ""). I have not seen this in the documentation, but it makes sense.

input(auto-complete="", ui-items='merchants.name', ng-model='selected')
+5
source

Just hit it too. Everything seems good when you have it doctype htmlat the beginning of the file .jade.

( html ..), {doctype: 'html'} , Jade:

jade -O "{doctype:'html'}" partial.jade
+5

Source: https://habr.com/ru/post/1543535/


All Articles