example/js/components/todo-app.js
function () {
				var filter = can.route.attr('filter');
				return this.todos.filter(function (todo) {
					if (filter === 'completed') {
						return todo.attr('complete');
					}

					if (filter === 'active') {
						return !todo.attr('complete');
					}

					return true;
				});
			}
function () {
				var filter = can.route.attr('filter');
				return this.todos.filter(function (todo) {
					if (filter === 'completed') {
						return todo.attr('complete');
					}

					if (filter === 'active') {
						return !todo.attr('complete');
					}

					return true;
				});
			}
function ( ) { var filter = can . route . attr ( 'filter' ) ; return this . todos . filter ( function ( todo ) { if ( filter === 'completed' ) { return todo . attr ( 'complete' ) ; } if ( filter === 'active' ) { return ! todo . attr ( 'complete' ) ; } return true ; } ) ; }
Returns a list of Todos filtered based on the route
Returns a list of Todos filtered based on the route