【问题标题】:How to retrieve data from Form in dynamically wizard in angular 6如何在角度 6 中的动态向导中从表单中检索数据
【发布时间】:2019-07-30 10:07:29
【问题描述】:

我正在尝试使用angular-archwizard 动态创建表单向导,并且当用户单击完成按钮时,我想从表单中检索每个步骤的数据作为 JSON。 以我的代码为例:

https://stackblitz.com/edit/angular-5-step-wizard-pzxmco

【问题讨论】:

    标签: angular wizard


    【解决方案1】:

    请查看以下使用 angular-archwizard 的示例代码。

    你也可以使用类似这样的函数来获取数据:

    getData(){
        this.wizard.wizardSteps._results.forEach(res=>{
          if(res.selected){
            console.log(res.stepTitle, res);
          }
        });
      }
    

    https://stackblitz.com/edit/angular-archwizard-simple-demo-edsmgs?file=src/app/app.component.html

    【讨论】:

    • 谢谢,但举个例子,我如何从输入标签中读取数据?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-07
    • 2016-09-04
    • 1970-01-01
    • 1970-01-01
    • 2019-03-13
    • 1970-01-01
    • 2016-05-30
    相关资源
    最近更新 更多