-2

I have an existing Angular 6 project and we would want to build an Angular element as a child of the main app module.

Is that possible?

I tried adding a new custom component and using createCustomElement to register. However, since it is a child component and not in the app.component.ts' selector tag, it is never picked up. The build files do not have any reference of the new custom element created.

Has Angular community extended this feature?

mruanova
  • 6,351
  • 6
  • 37
  • 55
Divya Jose
  • 389
  • 1
  • 4
  • 21
  • Perhaps you are mixing up the terms a little bit what might lead to confusion. Could you clarify what you want to achive? You have an Angular component that is used as a child by antother component and want to turn this child into an Angular Element and use it only with the custom tag? Correct? – jowey Mar 11 '19 at 09:57

1 Answers1

0

I do not see a way for Angular to support this, where one of the child components can be exported as a custom element and used in other projects.

Divya Jose
  • 389
  • 1
  • 4
  • 21