In the code below, I have a model called 'defaultGraphMetricOption
'. Now I want to pass this model value in another directive attribute eg columnTitles="Countries, {{defaultGraphMetricOption}}"
But it doesn't work. Could someone please shed some light on this?
<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>
Update:
I expect 'defaultGraphMetricOption
's value to be rendered in 'columnTitles'
instead I get '{{defaultGraphMetricOption.value}}'
as it is.
defaultGraphMetricOption
is an object, what kind of value are you expecting? Are you not supposed to be accessing a field? A method? How about including the model information! – My Head Hurts Jul 12 '13 at 10:25