I'm currently working on integrating a versatile typeahead directive. This directive requires a list of options and a configuration object as attributes. Within the configuration object, there is a property called "label" which dictates what the user sees and how their queries are filtered. Unfortunately, I'm facing challenges in utilizing this property within my filter expression, shown as follows:
uib-typeahead="option as option[config.label] for option in options | filter:{ config[label] :$viewValue }
Upon attempting to implement this, I encounter the following error:
Syntax Error: Token '[' is unexpected, expecting [:] at column 26 of the expression [options | filter:{ config[label] :$viewValue }] starting at [[label] :$viewValue }].
Any assistance would be greatly appreciated!