Skip to content

Instantly share code, notes, and snippets.

@Purus
Created May 15, 2016 17:09
Show Gist options
  • Save Purus/7adbbb6e94e7f61d62d95788b01b41e7 to your computer and use it in GitHub Desktop.
Save Purus/7adbbb6e94e7f61d62d95788b01b41e7 to your computer and use it in GitHub Desktop.
Issue for muli-select
ctrl.controller('UploadCtrl', function($scope, $cordovaCamera, $cordovaImagePicker, Service) {
$scope.categories = Service.getUncheckedCategories();
$scope.onValueChanged = function(value){
console.log(value);
}
});
<ion-list>
<ion-item ng-click="showItems($event)">
<div ng-repeat="item in text | showTextData:this">
{{ item }}
</div>
<span class="item-note">{{noteText}}</span>
</ion-item>
</ion-list>
<ion-modal-view>
<ion-header-bar class="bar-positive">
<button class="button button-positive button-icon ion-ios-arrow-back" ng-click="hideItems()" />
<h1 class="title">{{headerText}}</h1>
<button class="button button-positive button-icon ion-checkmark" ng-click="validate()" />
</ion-header-bar>
<ion-content>
<ion-list>
<ion-item class="item-checkbox" ng-repeat="item in items">
<label class="checkbox">
<input type="checkbox" ng-checked="item.checked" ng-model="item.checked">
</label>
<div ng-if="isTranslate">
{{ item | translateItem:this }}
</div>
<div ng-if="!isTranslate">
{{ $eval('item.' + textProperty) }}
</div>
</ion-item>
</div>
</ion-content>
</ion-modal-view>
<label class="item item-input item-select">
<div class="input-label">
Categories
</div>
<multiselect
header-text="Select Categories"
items="categories"
text-property="value"
value-property="id"
text="Select categories"
note-text="Mandatory"
modal-template-url="js/templates/modal-template.html"
template-url="js/templates/item-template.html"
value-changed="onValueChanged(value)"
</multiselect>
</label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment