I have the following filter that works as it should on the “ACCOUNTNAME” 
column :

<tr ng-repeat="record in records 
|filter:paginate|filter:{ACCOUNTNUMBER:searchText}">

 

I also have a ng-model /variable ‘seletcedCol’ that gets the selected 
Column and is displayed with the correct data using {{selectedCol}}.

 

Here are the two models I have for the searchText and selectedCol.

<select id="selectedCol" ng-model="selectedCol"  ng-options="column for 
column in columns|orderBy:'toString()'"><option value="">--Select One--</
option></select>

                    <input id="searchText" ng-model="searchText" type="text" 
placeholder="Search" />

 

I’m trying to use selectedCol in the filter instead of the column 
name(hardcoded) , but it doesn’t work correctly…any idea why this wouldn’t 
work?
<tr ng-repeat="record in records 
|filter:paginate|filter:{selectedCol:searchText}"> 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to