angular-advanced-searchbox
angular-advanced-searchbox copied to clipboard
Parameter issue
My code is:
html:
<nit-advanced-searchbox ng-model="searchParams" parameters="availableSearchParams" placeholder="Cerca..." parameters-label="suggerimento parametri"> </nit-advanced-searchbox>
js:
$scope.searchParams = {};
$scope.availableSearchParams = [ { key: "id", name: "ID", placeholder: "ID..." }, { key: "acquisto", name: "Acquistato il", placeholder: "Acquistato il..." }, { key: "nome", name: "Nome cliente", placeholder: "Nome cliente..." }, { key: "importo", name: "Importo", placeholder: "Importo..." }, { key: "quantita", name: "Quantità", placeholder: "Quantità..." }, { key: "spedizione", name: "Spedizione", placeholder: "Spedizione..." }, { key: "stato", name: "Stato", placeholder: "Stato..." } ];
but it return me this error: https://docs.angularjs.org/error/$compile/ctreq?p0=ngModel&p1=key
it seems to need something else.
what does your controller look like? can you share your code or a jsfiddle/plunk showing the problem.
Your config and directive look ok - heres an example with your data - http://plnkr.co/edit/qXmyk69gAAzaMkPjWYxk?p=preview
Looks like this is related to #63