src/components/chips/demoContactChips/script.js
function delayedQuerySearch(criteria) {
      if (!pendingSearch || !debounceSearch())  {
        cancelSearch();

        return pendingSearch = $q(function(resolve, reject) {
          // Simulate async search... (after debouncing)
          cancelSearch = reject;
          $timeout(function() {

            resolve(self.querySearch(criteria));

            refreshDebounce();
          }, Math.random() * 500, true);
        });
      }

      return pendingSearch;
    }
function delayedQuerySearch(criteria) {
      if (!pendingSearch || !debounceSearch())  {
        cancelSearch();

        return pendingSearch = $q(function(resolve, reject) {
          // Simulate async search... (after debouncing)
          cancelSearch = reject;
          $timeout(function() {

            resolve(self.querySearch(criteria));

            refreshDebounce();
          }, Math.random() * 500, true);
        });
      }

      return pendingSearch;
    }
function delayedQuerySearch ( criteria ) { if ( ! pendingSearch || ! debounceSearch ( ) ) { cancelSearch ( ) ; return pendingSearch = $q ( function ( resolve , reject ) { // Simulate async search... (after debouncing) cancelSearch = reject ; $timeout ( function ( ) { resolve ( self . querySearch ( criteria ) ) ; refreshDebounce ( ) ; } , Math . random ( ) * 500 , true ) ; } ) ; } return pendingSearch ; }
Async search for contacts
Also debounce the queries; since the md-contact-chips does not support this
Async search for contacts Also debounce the queries ; since the md - contact - chips does not support this