[英]Add css class to Ember.Select
我需要將css類添加到Ember.Select視圖:
{{view Ember.Select contentBinding="kpiTypes" valueBinding="model.amount" optionValuePath="content.value" optionLabelPath="content.name"}}
只添加類不起作用
使用classNames
屬性:
{{view Ember.Select classNames="foo bar"}}
對不起,我知道我真的很晚了。 但這可能會為需要幫助的其他人節省時間。
正如Marcio所說,如果你想將它作為一個靜態類添加到你的標簽中,你可以使用classNames 。 如果需要將動態屬性綁定為其類,我們可以使用classNameBindings關鍵字。
{{view Ember.Select contentBinding="App.algosController" selectionBinding="App.selectedAlgoController.algo" optionLabelPath="content.algoName" optionValuePath="content.id" classNameBindings="App.selectedAlgoController.algo.algoType"}}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.