angularjs-directive – Jade中的Angular Directive

前端之家收集整理的这篇文章主要介绍了angularjs-directive – Jade中的Angular Directive前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个AngularJS的指令,并使用以下方法在Jade Template中调用它:

输入(auto-complete,ui-items =’merchants.name’,ng-model =’selected’)

我需要自动完成(没有=符号),但它的HTML显示

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

我怎样才能消除=“自动完成”?

解决方法

引自 How can I add an attribute without a value?

I did find that null removes the attribute and an empty string
provides the desired result. So
script(src=”/javascripts/angular-0.9.19.js”,ng:autobind=””) works. I
didn’t see this in the documentation,but it makes sense.

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

猜你在找的Angularjs相关文章