UNPKG

ng-ytl-zorro-antd

Version:

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

34 lines (30 loc) 763 B
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'nz-demo-carousel-vertical', template: ` <nz-carousel nzVertical> <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 NzDemoCarouselVerticalComponent implements OnInit { array = [ 1, 2, 3 ]; // try dynamic change the array ngOnInit() { setTimeout(() => { this.array = [ 1, 2, 3, 4 ]; }, 500); } }