Search code examples
angularangular-ngselect

What is the ussage of ng-typetosearch-tmp and ng-notfound-tmp?


I was looking in the documentation of angular and ng select, but I can't find anything that mentions what these two attributes are for next to ng template.

ng-typetosearch-tmp and ng-notfound-tmp

<ng-select>
<ng-template ng-typetosearch-tmp>
            <div class="ng-option-disabled">
              text1...
            </div>
          </ng-template>
          <ng-template ng-notfound-tmp>
            <div class="ng-option disabled">
              text2...
            </div>
          </ng-template>
</ng-select>


Solution

  • ng-typetosearch-tmp is used when [typeahead] is enabled to change what it displayed before the user starts typing (the default text is "Type to search"). If you just want to change the text you can also use the [typeToSearchText] input.

    ng-notfound-tmp is used to change what is displayed when no items are found after a search term has ben entered. Again, if you want to just change the text you can also use the [notFoundText] input.