如何在创建指令 angularjs 之前检查 html 绑定



一个页面,我调用自定义选择框指令来显示月份,该指令需要一些参数:

<custom-select-box
id="month"
model="month"
model-required
model-name="month"
options="month.value as month.name for month in months"
aria-label="{{month.name}}">
<option value="">{{'dcl-spa.components.claim-and-link.month.mm'|translate}}</option>
</custom-select-box>

但是当我定向到此页面或刷新时,<option>中的参数{{'dcl-spa.components.claim-and-link.month.mm'|translate}}无法绑定到 html,只需在页面上显示键dcl-spa.components.claim-and-link.month.mm。 指令自定义选择框不能更改。 那么在这种情况下我应该怎么做呢? 谢谢

选项标记应位于custom-select-box directive template.

最新更新