NetanelBasal
9/11/2017 - 3:30 PM

ngcarousel2.ts

@Component({
  selector: 'carousel',
  template: `
    <section class="carousel-wrapper">
      <ul class="carousel-inner" #carousel>
        <li *ngFor="let item of items;" class="carousel-item">
          <ng-container [ngTemplateOutlet]="item.tpl"></ng-container>
        </li>
      </ul>
    </section>
  `,
  styles: [`...`]
})
export class CarouselComponent implements AfterViewInit {
  @ContentChildren(CarouselItemDirective) items : QueryList<CarouselItemDirective>;
}