Component in a Component - Angular

 

Component Within A Component

Angular 17, 11/29/204, by Eric Wood



Background:

We have adopted this pattern of files for components (shown here as Department and Team):



The Team screen has been proven to work stand-alone by adding a menu option and clicking to see if the screen runs. We do this to limit the debugging if issues arise.



Goal:

We want Teams to appear when we click Add or Edit Department:







department.component.ts



department.component.html



departmentTeam.component.ts





What Must Match:

1) The parent typescript file - The component name of child component must match the upper import statement and with folder path correct.

2) The parent typescript file - The @component.imports name must match the child component’s name.

3) The parent HTML identifier must match the @component.selector of the child component.



Comments

Popular posts from this blog

Upgrading to .NET8 from desktop versions 4.8.X

GHL Chat Bots for Webpage

GHL > Set website so shorter URL address