Search Posts

Category: angular-ui-select

AngularJs [v1.6.6] – Select2 doesn’t renders and I don’t get any error

Before saying anything, I’d like to inform you that I am totally new to AngularJS, so my question may seem odd. So, I am working on a project of a company, which is built on AngularJS 1.6.6. Recently they asked me to render a select2 control, with the capability to search cities using a service. In order to implement the select2 I have installed this using npm: “ui-select”: “^0.19.8”. Then, in the app initialization script […]

How to fill ui-select choices items when user typing?

I am using ui-select to show items in select tag and search in items: <ui-select name=”courseId” ng-model=””> <ui-select-match> <span ng-bind=”$select.selected.title”></span> </ui-select-match> <ui-select-choices repeat=” as item in ( | filter: $ track by”> <span ng-bind=”item.title”></span> </ui-select-choices> </ui-select> How can I fill items when user is typing and make remote call instead of repeat directive? For example maybe something like this: <ui-select name=”courseId” ng-model=””> <ui-select-match> <span ng-bind=”$select.selected.title”></span> </ui-select-match> <ui-select-choices refresh=”vm.searchCourses($select)”> <span ng-bind=”item.title”></span> </ui-select-choices> </ui-select> angular.module(‘rgh’).controller(‘CourseController’, CourseController); […]

UI-Select Pagination prevent select box from closing everytime modal is updated

I am using the Angualr JS library ui-select and have a large list of items that have are paginated to improve performance as suggested in this post This all works fine. However when I scroll to the bottom of the select box and reach the limit more values are added but the select box closes and I have to re open it to see the updated select list. Is there a way to prevent […]

Angular UI-Select tagging Simple String Tags (With Custom Tag Label & Sort Enabled) demo not working

I am new in AngularJS, I am building a recipe website which uses angular ui-select when adding tags which will be added to the db if it’s not already on db. I downloaded AngularJS and Angular UI-Select and added it in my BundleConfig.cs and added the demo.js code here in my Site.js BundleConfig.cs bundles.Add(new ScriptBundle(“~/bundles/angular”).Include( “~/Scripts/angular.min.js”)); bundles.Add(new ScriptBundle(“~/bundles/select”).Include( “~/Scripts/select.min.js”)); bundles.Add(new ScriptBundle(“~/bundles/site”).Include( “~/Scripts/Site.js”)); then I added this in my html <ui-select multiple tagging tagging-label=”(custom ‘new’ label)” […]

Google Smart Lock remove on login form

How can I remove this Google Smart Lock in my form for login. Heres my HTML code <form novalidate autocomplete=”new-password”> <div class=”form-group”> <input type=”text” id=”pEmployeeID” class=”form-control” placeholder=”Employee ID” ng-model=”portal.loginData.employeeID” ng-keypress=”portal.employeeIdEnter($event)” ng-minlength=”3″ ng-required=”true” maxlength=”4″ ng-trim=”false” autocomplete=”off” numeric-only /> </div> <div class=”form-group”> <input type=”password” id=”pEmployeePin” class=”form-control” placeholder=”PIN Number” ng-model=”portal.loginData.employeePin” ng-required=”true” maxlength=”4″ ng-trim=”false” numeric-only autocomplete=”off” /> </div> <div class=”text-center”> <div class=”btn-group”> <button type=”submit” class=”btn btn-primary” ng-click=”portal.ok()”><i class=”fa fa-check” aria-hidden=”true”></i> OK</button> </div> </div> </form> I already tried autocomplete=”off” or […]

Make ui-select as required field

ng-required=”true” and only required tags or not working with ui-select, this is a long standing bug and I think it is not solved yet. %ui-select(ng-model=”obj.prop” required) %ui-select(ng-model=”obj.prop” ng-required=”true”) above lines don’t work.These lines should workd like %input.form-control(ng-model=”obj.prop” ng-required=”true” type=”text”) I want to make ui-select as required field, If this is really a bug then is there an alternate way ?? These lines let the form to be submit even nothing is selected and don’t make […]

How to filter the list of countries by its first letter while search in ui-select using angular js?

How can i search the word by filtering the list by its first letter? <td class=”country-selection-cell”> <ui-select multiple ng-disabled=”service.serviceName === null” ng-model=”service.countries” close-on-select=”false” ng-change=”vm.checkIfDuplicatesExist(newServiceWithCountriesForm)” ng-attr-title=”{{service.serviceName === null?’Please select a service first’:’Choose countries’}}” ng-required=”true”> <ui-select-match placeholder=”Select countries…”> {{$item}} </ui-select-match> <ui-select-choices repeat=”country in vm.countries | filter:$ track by $index” position=’down’> {{country}} </ui-select-choices> </ui-select> </td> Source: AngularJS

angular ui-select2 not set value in edit mode

<select id=”e1″ style=”width:100%” ui-select2 tabindex=”-1″ ng-init=”GetAllAgent()” ng-model=”Agent” ng-options=”ctr as ctr.AgentName for ctr in ListAgent track by ctr.AgentId” ng-change=”GetSubAgentList(Agent.AgentId)”> <option value=””> </option></select> when it is in edit mode,could not set the default value using the below code angular.forEach($scope.ListAgent, function (value, index) { if (value.AgentId == HR.AgentId) { $scope.Agent = $scope.ListAgent[index]; } }) $scope.ListAgent= [{ AgentId: “0”, AgentName:”Ann” }, { AgentId: “1”, AgentName:”Muh” }]; and HR.AgentId=1 Source: AngularJS

ui-select Does Not Drop Down On Click

Got a time-sink of a bug which is hard to solve. I’m implementing a multi-select control using ui-select. As you can see in the plunks from that site, when you click on the inputs, you are meant to get a drop-down list. With my attempt, I am not getting anything when I click on the input, unless I click in the list first, and then about 1cm below the list (which is where the actual […]