Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to use the name of a dimension as a parameter for a clear button, but it only works if I set the name of the field using a static value:
<div class="lui-buttongroup">
<lui-button ng-click="app.field('FIELD_NAME').clear()" >Clear WORKS OK! </lui-button>
<lui-button ng-click="app.field('{{data.headers[0].qFallbackTitle}}').clear()">Clear DOESN'T WORK</lui-button>
</div>
If you include the ng-click parameter as text in the widged, you'll notice that the expression is parsed correctly.
Any guess why it doesn't work?
Hi,
In angularjs, for data binding, you don't need the double curly brace, this is used mostly for string expressions (https://docs.angularjs.org/guide/templates).
try:
<lui-button ng-click="app.field(data.headers[0].qFallbackTitle).clear()">Clear DOESN'T WORK</lui-button>
<!-- instead of -->
<lui-button ng-click="app.field('{{data.headers[0].qFallbackTitle}}').clear()">Clear DOESN'T WORK</lui-button>
I hope this helps,
Hi,
In angularjs, for data binding, you don't need the double curly brace, this is used mostly for string expressions (https://docs.angularjs.org/guide/templates).
try:
<lui-button ng-click="app.field(data.headers[0].qFallbackTitle).clear()">Clear DOESN'T WORK</lui-button>
<!-- instead of -->
<lui-button ng-click="app.field('{{data.headers[0].qFallbackTitle}}').clear()">Clear DOESN'T WORK</lui-button>
I hope this helps,