Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Need more informations and examples on ComponentFactory and ViewContainerRef. #3145

Open
pralhadstha opened this issue Jan 26, 2017 · 0 comments

Comments

@pralhadstha
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant