0

I'm building an Angular library that generate a form (the form definition is provided by an Angular application). This library has the basic built-in form-field type (text, textare, number, date, ...). But some applications need custom fields that will not be part of the library, so I need my library to be able to initialise those custom components declared in the application.

To summarise:

enter image description here

Any idea of which approach to take to achieve such requirement ?

Snook
  • 174
  • 10
  • 1
    Content projection would be nice I think. It's `ng-content`, and [you can find a lot of resources online](https://www.google.com/search?q=Angular+content+projection&oq=Angular+content+projection&aqs=chrome..69i57j69i60l2j69i64.5680j0j7&sourceid=chrome&ie=UTF-8). –  May 27 '19 at 14:40
  • Thank you @Maryannah, this is the way to go. – Snook May 29 '19 at 09:26
  • no problem, glad I could help ! –  May 29 '19 at 10:00

0 Answers0