加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs-directive – Jade中的Angular Directive

发布时间:2020-12-17 06:50:42 所属栏目:安全 来源:网络整理
导读:我有一个AngularJS的指令,并使用以下方法在Jade Template中调用它: 输入(auto-complete,ui-items =’merchants.name’,ng-model =’selected’) 我需要自动完成(没有=符号),但它的HTML显示为 input class =“ng-pristine ng-valid”ng-model =“selected”u
我有一个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')

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读