UNPKG

ng-ytl-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

34 lines (30 loc) 713 B
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'nz-demo-carousel-basic', template: ` <nz-carousel> <div nz-carousel-content *ngFor="let index of array"><h3>{{index}}</h3></div> </nz-carousel>`, styles : [ `:host ::ng-deep .ant-carousel .slick-slide { text-align: center; height: 160px; line-height: 160px; background: #364d79; color: #fff; overflow: hidden; } h3 { color: #fff; } ` ] }) export class NzDemoCarouselBasicComponent implements OnInit { array = [ 1, 2, 3 ]; ngOnInit() { setTimeout(_ => { this.array = [ 1, 2, 3, 4 ]; }, 500); } }