Custom template(transclusion without ng-content) for list component in Angular2
问题 I have a list component which shows only names. list component should be able to take custom template which will be given by user. List Component import {Component } from 'angular2/core'; @Component({ selector: 'my-list', template: `<p>This is List</p> <ul> <li *ngFor="#i of data"><div class='listItem'>{{i.name}}</div></li> </ul>` }) export class MyList implements OnInit{ data: Array<any> = [{name: 'John', age: 26},{name: 'Kevin', age: 26}, {name:'Simmons', age:26}]; } My Requirement <my-list