code: function getReactComponent( name, $injector ) {
      // if name is a function assume it is component and return it
      if (angular.isFunction(name)) {
        return name;
      }
  
      // a React component name must be specified
      if (!name) {
        throw new Error('ReactComponent name attribute must be specified');
      }
  
      // ensure the specified React component is accessible, and fail fast if it's not
      var reactComponent;
      try {
        reactComponent = $injector.get(name);
      } catch(e) { }
  
      if (!reactComponent) {
        try {
          reactComponent = name.split('.').reduce(function(current, namePart) {
            return current[namePart];
          }, window);
        } catch (e) { }
      }
  
      if (!reactComponent) {
        throw Error('Cannot find react component ' + name);
      }
  
      return reactComponent;
    }
docs: get a react component from name (components can be an angular injectable e.g. value, factory or available on window