-
Notifications
You must be signed in to change notification settings - Fork 27k
Description
I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
There is no way to set @inputs or subscribe to @output events of the Component created by NgComponentOutlet.
Expected behavior
I expect some to set values and to subscribe events.
What is the motivation / use case for changing the behavior?
At least, we should have the same level of functionality as ViewContainerRef.createComponent() which is roughly the programatic equivalent of NgComponentOutlet. That function returns a ComponentRef<any> which provides an instance property that allows direct access to the class instance of the Component. The original feature request for NgComponentOutlet defined an event on the directive that would fire and pass this ComponentRef object after creation. This did not make it into the current implementation and I see no other alternatives to access inputs/outputs.
Supporting only Components with no inputs or outputs severely limits the usefulness of NgComponentOutlet.
- Angular version: 4.0.0-rc.1