Created
March 20, 2014 20:37
-
-
Save alnutile/9673298 to your computer and use it in GitHub Desktop.
Angular and watching a filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <tbody> | |
| <tr ng-repeat="report in (reportsFiltered = ( reports | filter:{status:passFailShow} | filter:{site_id:siteFilter} | filter:tagged | filter:dateRangeCheck | filter:search))" ng-class="{danger: report.status == 0}"> | |
| <td ng-bind-html="report.status | passFailFilter "></td> | |
| <td>{{ report.created }}</td> | |
| <td>{{ report.test_name }}</td> | |
| <td><span ng-repeat="tag in report.tags"> {{tag}} </span></td> | |
| <td>{{ report.user_id }}</td> | |
| <td><a href="#/reports/{{ report.rid }}">drill down</a></td> | |
| </tr> | |
| </tbody> | |
| </table> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scope.$watch('reportsFiltered', function(){ | |
| //do something with the data | |
| }, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment