2017-05-30 28 views
0

我有一個列表li項目創建ngTagsInput我想添加選定的類到特定的鋰項目誰是通過某種方式無關如何給li添加特定的類? ngTagsInput AngularJS

任何人都可以幫忙嗎?如果你想讓我詳細說明這個問題,我將不要投下這個問題。

+2

檢查[documentation](http://mbenford.github.io/ngTagsInput/documentation/api)中的'tagClass', –

回答

0

我不知道如果u已經解決了這個問題,但我什麼,我做的是這樣的:

template.html

<tags-input name="developer" ng-model="developer" placeholder="designer" 
class="tagDev"></tags-input> 

CSS

.tagDev .tags .tag-item{ 
background: (color) !important; 
color: white; 
border: 1px solid (color); 
} 

希望它是有用的!

如果你想做更多的標籤輸入只使用class和.class .tags。 tag-item {style}