Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Expected 1 input.ui-select-search but got '0' UI-Select #1946

Open
@naresh217

Description

@naresh217

I am trying to update "bootstrap/select-multiple.tpl.html" by adding ng-if

var app = angular.module('demo', ['ngSanitize', 'ui.select']);
app.run(["$templateCache",function($templateCache){
  var tmpl = `<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown
         form-control" ng-class="{open: $select.open}">
    <div ng-if="true">
        <div class="ui-select-match"></div>
        <input custom-directive enable-format="{{$ctrl.enableMobileNumberFilter}}" type="search" autocomplete="off" autocorrect="off" autocapitalize="off"
               spellcheck="false" class="ui-select-search input-xs"
               placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled"
               ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-expanded="{{$select.open}}"
               aria-label="{{$select.baseTitle}}" ng-class="{'spinner': $select.refreshing}" ondrop="return false;">
    </div>
    <div class="ui-select-choices"></div>
    <div class="ui-select-no-choice"></div>
</div>`
        $templateCache.put("bootstrap/select-multiple.tpl.html",tmpl);
    }])

I have just added ng-if ="true" (eventually this will replace with actual condition). But it is throwing me an error "Expected 1 input.ui-select-search but got '0'"

It works just fine once we remove ng-if.

Plunker

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions