📜  角度步进器更改前等待更改 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.888000             🧑  作者: Mango

代码示例3
// I personally do this in ngAfterViewInit() method
setTimeout(() => {
    this.stepper.steps.forEach((step, idx) => {
        step.select = () => {
            // Your custom code here
            // if you want to change step do execute code below
            this.selectedStepIndex = idx;
        };
    });
});