import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd'; @Component({ selector: 'cm-steps-doc-4', templateUrl: './steps-doc-4.component.html', styleUrls: ['./steps-doc-4.component.css'] }) export class StepsDoc4Component implements OnInit{ current = 0; index = 'First-content'; pre() { this.current -= 1; this.changeContent(); } next() { this.current += 1; this.changeContent(); } done() { this._message.success('done'); } changeContent() { switch (this.current) { case 0: { this.index = 'First-content'; break; } case 1: { this.index = 'Second-content'; break; } case 2: { this.index = 'third-content'; break; } default: { this.index = 'error'; } } } constructor(private _message: NzMessageService) { } ngOnInit() {} ngOnDestroy() {} }