angularUI select dropdown displays data only after entering a character

I am using AngularJS v1.2.15 and angular-ui / ui-select. My select HTML is:

<div class="form-group col-md-3">
    <div class="input-group select2-bootstrap-append">

      <ui-select ng-model="modelOwner.selected" theme="select2" class="form-control">
        <match placeholder="Select Owner">{{$}}</match>
        <choices repeat="item in owner | filter: $">
          <span ng-bind-html=" | highlight: $"></span>

      <span class="input-group-btn">
        <button ng-click="modelOwner.selected = undefined" class="btn btn-danger">
          <span class="glyphicon glyphicon-trash"></span>


My call in controller is:

$scope.modelOwner = {};

OwnersFactory.query({}, function (data) {
  $scope.owner = data;

My service code:

bootstrapApp.factory('OwnersFactory', function ($http,$state,serviceUrl,$resource,$log) {

    return $resource(serviceUrl + 'owner/:id', {}, {
        show: { method: 'GET',  params: {}, isArray: false }

Now, in my form i can view the values only after entering at least a single character. I want this select dropdown to display values just by clicking on the dropdown (not by entering any character.)

Possible Solution: if i could load my state only after all the AJAX calls have been made.

Please help me out here.


if you are using ui-router you can use resolve on each state, so that the call is resolved before initializing the controller

Need Your Help

How do I read response headers + body from single POST using scala's dispatch lib

scala httpclient scala-dispatch

I have been trying to use the dispatch library to download a file via an http POST request. The server returns a "content-disposition" header suggesting a filename for the data file it returns.

Ruby on rails - need to send messages to emails at a particular time a week

ruby-on-rails ruby rubygems email-integration

I would like to know how i should go about with this project. I need to send emails to people once a week. However this has to be auto generated and sent at a certain time every week. How hard is t...