angular-advanced-searchbox icon indicating copy to clipboard operation
angular-advanced-searchbox copied to clipboard

Support for viewKey and viewValue

Open marchrius opened this issue 8 years ago • 1 comments

viewKey and viewValue added to support the print of a value of an object.

marchrius avatar Feb 10 '17 13:02 marchrius

@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

Cordobo avatar May 15 '17 17:05 Cordobo