code: function $onInit() {
          if (!ctrl.multiple && ctrl.model.length) {
              $scope.item = ctrl.model[0];
          }
  
          if (ctrl.options instanceof Array) {
              ctrl._options = ctrl.options;
          } else {
              ctrl.options(ctrl.searchTerms, function (options) {
                  ctrl._options = options;
                  if (options.length === 0) checkLater();
                  $scope.$apply();
              });
          }
  
          if (ctrl.search === undefined) {
              ctrl.search = true; // default true
          }
      }
docs: --------------------------------