Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<require from="./date-format"></require>
<require from="./filter"></require>
<div class="container">
<h1>todo list</h1>
<div class="panel panel-default">
<div class="panel-heading">
<div class="container">
<div class="row">
<input type="text" class="form-control col-md-2 search-box" value.bind="searchTerm" placeholder="search..." ></input>
<button class="btn btn-default col-md-2 clear-btn" if.bind="searchTerm.length > 0" click.delegate="clearFilter()"><i class="fa fa-times"></i> clear</button>
<div class="panel-body">
<table class="table table-striped table-bordered">
<th>Created At</th>
<tr repeat.for="todoItem of todoItems | filter:searchTerm:filterFunc">
<td><span class="${todoItem.is_complete ? 'completed-task' : 'incomplete-task'}"> ${todoItem.text} </span></td>
<td>${todoItem.created_at | dateFormat}</td>
<td><input type="checkbox"checked.bind="todoItem.is_complete"></input></td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment