javascript - 在创建指令 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>
但是当我直接到这个页面或刷新时,里面的参数{{'dcl-spa.components.claim-and-link.month.mm'|translate}}
不能<option>
绑定到 html,只是dcl-spa.components.claim-and-link.month.mm
在页面上显示键。指令 custom-select-box 不能更改。那么我该怎么办呢?谢谢
解决方案
选项标记应该在custom-select-box directive template.
推荐阅读
- sql - 如何使用 SQL 查询在 EID 列中查找相同 EUID 和 PID 的 AID 值
- android-studio - Android Studio:任务“:app:compileDebugKotlin”执行失败
- objective-c - 延迟使用本地文件为 mac 应用程序自定义图标(使用 setIcon)
- express - 如何编写处理图像和表单数据上传流的突变解析器?
- azure - 如何在 Azure DevOps 上跟踪触发我的管道的原因?
- python-3.x - 使用 BeautifulSoup 或 Pandas 抓取表数据
- html - 使用 Boostrap-Vue 时如何对齐卡片标题
- apache-camel - pollEnrich 从 FTP
- swiftui - 拆分表单内联导航栏标题
- avfoundation - 什么会影响音频单元渲染回调周期(周期)?