How do i check html binding before create directive angularjs

53 Views Asked by At

A page, i called custom select-box directive to show Month and that directive need some arguments:

<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>

But when i direct to this page or refresh, the argument {{'dcl-spa.components.claim-and-link.month.mm'|translate}} in <option> can not bind to html, just show the key dcl-spa.components.claim-and-link.month.mm on page. The directive custom-select-box can not be change. So what should i do on this case? Thanks

1

There are 1 best solutions below

2
On

The option markup should be inside the custom-select-box directive template.