Accessing $select · angular-ui/ui-select Wiki · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Accessing $select

Tinomuchenje edited this page Aug 1, 2019 · 4 revisions

Many requests for custom features can be satisfied by accessing the uiSelectController in your own custom directive.

To do this, create a directive of your own which requires the uiSelect directive, as shown below:

myModule.directive('myUiSelect', function() {
  return {
    require: 'uiSelect',
    link: function(scope, element, attrs, $select) {
      
    }
  };
});

Using it as illustrated below:

<ui-select my-ui-select ng-model="person.selected">
  <ui-select-match> ... </ui-select-match>
  <ui-select-choices> ... </ui-select-choices>
</ui-select>

Refer to the source code of uiSelectController to see what is functionality is available through this API.

If you feel your directive may be useful to others, feel free to submit it is as a Pull Request for consideration for inclusion in the library.

Examples

  1. Select active item on Blur
  2. Placeholder Always Visible

Clone this wiki locally

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.