0

Can someone please tell me if I can achieve this in angular2+.

 <app-list-table [list]="myList">
    <app-list-column name="'Name'"></app-list-column>
    <app-list-column name="'Direction'"></app-list-column>
 </app-list-table>
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
Josf
  • 776
  • 1
  • 8
  • 21

1 Answers1

0
  1. In module import router module as

RouterModule.forRoot([ { path: 'name', component: NameComponent }, { path: 'direction', component: DirectionComponent } ])

  1. In list table component use selectors of sub components
  • Thanks. but I don't want to create different components for each child item. I think the solution will be – Josf Feb 02 '18 at 00:29
  • https://stackoverflow.com/questions/45112717/angular-4-dynamic-template-with-interpolation – Josf Feb 02 '18 at 00:31