在下面的代码中,我有一个名为“defaultGraphMetricOption
”的模型。现在我想在另一个指令属性中传递此模型值,例如columnTitles="Countries, {{defaultGraphMetricOption}}"
但它不起作用。有人可以对此有所了解吗?
<select ng-model="defaultGraphMetricOption" ng-options="filter as filter.label for filter in graphMetricOptions" >
</select>
<!-- datatable reusable component -->
<datatable class="pagination-component"
columnTitles="Countries, {{defaultGraphMetricOption.value}}"
columnDataFields="name,view"
sortField="name"
watchedProperty="locationMapTableDatas"
></datatable>
更新:
我希望在defaultGraphMetricOption
中呈现''columnTitles'
的值,而不是'{{defaultGraphMetricOption.value}}'
。