How can I use an AngularJS filter to select rows from a range?

user1943020

I am trying to filter rows returned and having a problem.

I have the following:

    <tr 
    data-ng-show="grid.data.length > 0" 
    data-ng-repeat="row in grid.data | filter:isProblemIdInRange>
       <td>{{ row.problemId }}</td>

In my controller I have:

    $scope.isProblemIdInRange = function (row) {
        return row.problemId >= $scope.lower && row.problemId < $scope.upper;
    };

I have input fields:

     <input type="text" data-ng-model="$scope.lower" />
     <input type="text" data-ng-model="$scope.upper" />

My problem is that whatever I enter into the two inputs there is nothing that comes back. When I remove the filter then all is okay

zs2020

Remove the $scope

<input type="text" data-ng-model="lower" />
<input type="text" data-ng-model="upper" />

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can I use a filter inside a filter in AngularJS?

From Dev

How can I delete rows from a set range object

From Dev

How can i use SQL Select Insert to copy rows from one table to another

From Dev

when use matplotlib for making graph, how can i select range?

From Dev

How can I access and test an AngularJS filter from the browser console?

From Dev

How can I filter text/divs from two select options?

From Dev

How can I select 2 different random rows from a table?

From Dev

How can I create a range filter in Elasticsearch?

From Dev

How to use a variable in the i position to filter rows

From Dev

How do I filter out SQL rows where numbers range?

From Dev

How can I register a filter in AngularJS?

From Dev

How can I test this angularjs filter?

From Dev

How can I use a string list from a select statement in a NOT IN clause

From Dev

How can I use an NSPredicate to select an exact phrase from an array?

From Dev

How can I use an NSPredicate to select an exact phrase from an array?

From Dev

How can I use a local variable in SELECT FROM?

From Dev

Is there a SQL Function that I can use to return a range of rows for a Primary Key?

From Dev

Is there a SQL Function that I can use to return a range of rows for a Primary Key?

From Dev

How can I SELECT rows that are not number

From Dev

How Can I Show Rows With Multi Select?

From Dev

Can I use one select statement to get multiple rows from 2 tables with FK

From Dev

In a PivotChart filter, how do I select a just range in the column to display?

From Dev

How can I use an Angularjs filter within the html element of a d3 tooltip?

From Dev

How can I use AngularJS 1 to create table rows with the attributes of an array of objects?

From Dev

How to select a range of rows from a multiple column primary key?

From Dev

How to select array of rows with max param from each range?

From Java

How can I filter rows if one array contains all values from another array using BigQuery?

From Dev

How to select rows in a given range?

From Dev

AngularJS: can I use filter, defined in another module?

Related Related

  1. 1

    Can I use a filter inside a filter in AngularJS?

  2. 2

    How can I delete rows from a set range object

  3. 3

    How can i use SQL Select Insert to copy rows from one table to another

  4. 4

    when use matplotlib for making graph, how can i select range?

  5. 5

    How can I access and test an AngularJS filter from the browser console?

  6. 6

    How can I filter text/divs from two select options?

  7. 7

    How can I select 2 different random rows from a table?

  8. 8

    How can I create a range filter in Elasticsearch?

  9. 9

    How to use a variable in the i position to filter rows

  10. 10

    How do I filter out SQL rows where numbers range?

  11. 11

    How can I register a filter in AngularJS?

  12. 12

    How can I test this angularjs filter?

  13. 13

    How can I use a string list from a select statement in a NOT IN clause

  14. 14

    How can I use an NSPredicate to select an exact phrase from an array?

  15. 15

    How can I use an NSPredicate to select an exact phrase from an array?

  16. 16

    How can I use a local variable in SELECT FROM?

  17. 17

    Is there a SQL Function that I can use to return a range of rows for a Primary Key?

  18. 18

    Is there a SQL Function that I can use to return a range of rows for a Primary Key?

  19. 19

    How can I SELECT rows that are not number

  20. 20

    How Can I Show Rows With Multi Select?

  21. 21

    Can I use one select statement to get multiple rows from 2 tables with FK

  22. 22

    In a PivotChart filter, how do I select a just range in the column to display?

  23. 23

    How can I use an Angularjs filter within the html element of a d3 tooltip?

  24. 24

    How can I use AngularJS 1 to create table rows with the attributes of an array of objects?

  25. 25

    How to select a range of rows from a multiple column primary key?

  26. 26

    How to select array of rows with max param from each range?

  27. 27

    How can I filter rows if one array contains all values from another array using BigQuery?

  28. 28

    How to select rows in a given range?

  29. 29

    AngularJS: can I use filter, defined in another module?

HotTag

Archive