是否可以以不太重复的方式编写附加的html?
<md-button ng-if="vm.isUpdate" class="color-white md-primary PH-12 M-0" ui-sref="alarm-sop-details({sopId: vm.sopId})">
<span translate>cancel</span>
</md-button>
<md-button ng-if="!vm.isUpdate" class="color-white md-primary PH-12 M-0" ui-sref="alarm-sop-list">
<span translate>cancel</span>
</md-button>
如您所见,两个md按钮的唯一区别在于条件和状态ref。