angular.io icon indicating copy to clipboard operation
angular.io copied to clipboard

Need more informations and examples on ComponentFactory and ViewContainerRef.

Open pralhadstha opened this issue 9 years ago • 0 comments

I am a bit new to angular world and i am not much familiar with the angular. It would be great if the documentation would have an example on how to use and what are it's dependency and variables used.

Like this one:

https://angular.io/docs/ts/latest/api/core/index/ComponentFactory-class.html

class ComponentFactory {
constructor(selector: string, _viewClass: Type<AppView<any>>, _componentType: Type<any>)
C 
selector : string
componentType : Type<any>
create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any) : ComponentRef<C>
}

There is nothing written in the class description and details.

It would be great if we would know what the dependency the class and it's variables wants. Like:

  • what is selector is? Is it the string value only or the selector of the component.

  • what the componentType?

Hope there will be more on the docs that will help all the developers to easily use those classes.

pralhadstha avatar Jan 26 '17 07:01 pralhadstha