【发布时间】:2019-01-11 17:38:35
【问题描述】:
下面是我的 html 代码,我需要的 href 应该是基于我当前状态的动态的,而不是使用两个不同的 div,我可以只使用一个 div
<div ng-if="ctrl.currentState == 'employee'">
<small><a href="/createQuote" title="Change Settings"></a></small>
</div>
<div ng-if="ctrl.currentState == 'fleetmanager'">
<small><a href="/createQuote/fleetmanager" title="Change Settings"></a></small>
</div>
【问题讨论】: