2017-08-24 76 views
1

我正在使用angularjs-dropdown-multiselect。顯示angularjs-dropdown-multiselect以及下拉標籤名稱

代碼示例:

PLatform : <div ng-dropdown-multiselect="" options="example13data" selected-model="example13model" extra-settings="example13settings"></div> 

JS:

 $scope.example13model = []; 
    $scope.example13data = [ {id: 1, label: "David"}, 
{id: 2, label: "Jhon"}, 
{id: 3, label: "Lisa"}, 
{id: 4, label: "Nicole"}, 
{id: 5, label: "Danny"} ]; 
    $scope.example13settings = { smartButtonMaxItems: 3, smartButtonTextConverter: function(itemText, originalItem) { 
if (itemText === 'Jhon') { return 'Jhonny!'; } 
return itemText; } }; 

參考:http://dotansimha.github.io/angularjs-dropdown-multiselect/docs/#/main

我想在如下面一行來顯示標籤名稱和下拉。 enter image description here

但使用多選擇api後,我無法顯示,然後內聯,它顯示如下,請讓我知道如何解決這個問題。

enter image description here

回答

0

我發現,把它在一個範圍,而不是一個div解決了這個問題。

試試這個:

Platform 
<span 
    ng-dropdown-multiselect="" 
    options="example13data" 
    selected-model="example13model" 
    extra-settings="example13settings"> 
</span> 
相關問題