src/core/services/registry/componentRegistry.js
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 .