function(handle) {
        if (isValidID(handle)) {
          var deferred = $q.defer();
          var instance = self.get(handle);

          if (instance)  {
            deferred.resolve(instance);
          } else {
            if (pendings[handle] === undefined) {
              pendings[handle] = [];
            }
            pendings[handle].push(deferred);
          }

          return deferred.promise;
        }
        return $q.reject("Invalid `md-component-id` value.");
      }
function(handle) {
        if (isValidID(handle)) {
          var deferred = $q.defer();
          var instance = self.get(handle);

          if (instance)  {
            deferred.resolve(instance);
          } else {
            if (pendings[handle] === undefined) {
              pendings[handle] = [];
            }
            pendings[handle].push(deferred);
          }

          return deferred.promise;
        }
        return $q.reject("Invalid `md-component-id` value.");
      }
function ( handle ) { if ( isValidID ( handle ) ) { var deferred = $q . defer ( ) ; var instance = self . get ( handle ) ; if ( instance ) { deferred . resolve ( instance ) ; } else { if ( pendings [ handle ] === undefined ) { pendings [ handle ] = [ ] ; } pendings [ handle ] . push ( deferred ) ; } return deferred . promise ; } return $q . reject ( "Invalid `md-component-id` value." ) ; }
Async accessor to registered component instance
If not available then a promise is created to notify
all listeners when the instance is registered.
Async accessor to registered component instance If not available then a promise is created to notify all listeners when the instance is registered .
Return a promise that resolves to the instance of the component with the given handle.