angular-advanced-searchbox
angular-advanced-searchbox copied to clipboard
Support for viewKey and viewValue
viewKey and viewValue added to support the print of a value of an object.
@Marchrius At the moment it interferes with #64 at my merged version and it might duplicate functionality. Can you provide a simple example where and how to use your pr?
Sample array
var cities = [
{ id: 1, name: 'Berlin' },
{ id: 2, name: 'London' }
];
Returns the objects from cities-array, where I thought it would return obj.name (which in uib-typeahead is done via "item as item.name ..."
$scope.availableSearchParams = [
{ key: 'city', name: 'City', suggestedValues: cities }
];
Directive:
<nit-advanced-searchbox
ng-model="searchParams"
parameters="availableSearchParams"
placeholder="Search...">
</nit-advanced-searchbox>
Edit: Updated Issue #40 to #64