gpt4 book ai didi

javascript - 如何允许用户单击标题部分的下一步按钮?

转载 作者:行者123 更新时间:2023-12-02 23:18:27 25 4
gpt4 key购买 nike

我有一个按钮列表,我可以从中导航到其他页面并显示

创建变量

currentStep :number=1;

根据按钮为当前步骤添加ng-disable。

<button class="btn btn-outline-primary" (click)="first()" ng-disabled="currentStep == 1">First</button>
<button class="btn btn-outline-secondary" (click)="second()" ng-disabled="currentStep == 2">Second</button>
<button class="btn btn-outline-danger" (click)="third()" ng-disabled="currentStep == 3">Third</button>
<button class="btn btn-outline-warning" (click)="fourth()" ng-disabled="currentStep == 4">Fourth</button>
<button class="btn btn-outline-dark" (click)="fifth()" ng-disabled="currentStep == 5">Fifth</button>

不会填充数据并允许禁用的按钮传递第二页

最佳答案

创建变量

currentStep :number=1;

根据按钮为当前步骤添加ng-disable。

<button class="btn btn-outline-primary" (click)="first()" ng-disabled="currentStep == 1">First</button>
<button class="btn btn-outline-secondary" (click)="second()" ng-disabled="currentStep == 2">Second</button>
<button class="btn btn-outline-danger" (click)="third()" ng-disabled="currentStep == 3">Third</button>
<button class="btn btn-outline-warning" (click)="fourth()" ng-disabled="currentStep == 4">Fourth</button>
<button class="btn btn-outline-dark" (click)="fifth()" ng-disabled="currentStep == 5">Fifth</button>

关于javascript - 如何允许用户单击标题部分的下一步按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57054673/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com