0
我正在开发一个表单,如果此向导按钮为true,那么会出现一个“向导按钮”,表单呈现为向导。Angularjs条件向导
有避免代码重复的简单方法吗?
为例:
<wizard on-finish="saveit()" ng-if="data.form.config.wizardmode">
<wz-step title="Starting" ng-if="$index==0 && data.form.config.wizardmode">
<h1>This is the first step</h1>
<p>Here you can use whatever you want. You can use other directives, binding, etc.</p>
<input type="submit" wz-next value="Continue" />
</wz-step>
<wz-step title="Continuing">
<h1>Continuing</h1>
<p>You have continued here!</p>
<input type="submit" wz-next value="Go on" />
</wz-step>
<wz-step title="More steps">
<p>Even more steps!!</p>
<input type="submit" wz-next value="Finish now" />
</wz-step>
</wizard>
如果向导的时候,我将不得不重新编写整个形式? 有没有一个很好的逻辑(角度的方式)基本上隐藏/显示所有<wz-step>
标签?
谢谢,Patrick
你可以为每个表格做一个指令 – 2014-09-02 16:53:49
但我还有两种形式? – 2014-09-02 17:54:46
你将有2个表格,但你只会写一次 – 2014-09-02 17:56:47