0

I created some custom control and render a json of form attributes using the component factory and view resolver.

Same approach as below. Query.Add instead of Dynamic Component Loader (loadintolocation)

In custom controls I am emitting a valueChanged event. The problem is that the viewcomponent ref always points to the last control that was rendered. so in this.valueChanged.emit(event) code , "this" points to the last rendered control though the event emitted is of the control that has been changed.

How to overcome this ?

Community
  • 1
  • 1
  • I can't make sense of that description. Can you please post the code that demonstrates what you try to accomplish. Ideally with a Plunkter that allows to reproduce. – Günter Zöchbauer Jul 21 '16 at 06:12
  • HI, thanks for the comment. I was able to fix the issue. Using component ref i am adding custom built controls to a form. I was not able to get the handle of those controls on value changes. Now i am able to get it by adding listeners. – sandeep Jul 28 '16 at 19:07

0 Answers0