javascript - Using ui-tagging with single choice -
i'm newbie on angularjs , angular-ui , have problem module ui-select. need select single element list , if there isn't value, user can add manually, tagging system of ui-select doen't work single value , don't know why.
this ui-select code:
<ui-select tagging="tagstation" tagging-label="(add station)" ng-model="new.station"> <ui-select-match placeholder="choose or add">{{$select.selected.label}}</ui-select-match> <ui-select-choices repeat="station.value station in stationlist | filter: { label: $select.label }"> <div ng-bind-html="station.label | highlight: $select.search"></div> </ui-select-choices> </ui-select>
and function tagging attribute:
$scope.tagstation = function (newtag) { var item = { label: newtag, value: 0 }; return item; };
can me? thx
check out thread , particular answer i'm linking here. there's workaround add attribute tagging-label="false"
. fixes problem! i'm looking @ similar issue, unfortunately me, workaround doesn't seem address particular problem can't custom value stick.
Comments
Post a Comment