Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<head>
  <script  src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <link  rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />
  <script  src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.js"></script>
  <script  src="http://code.angularjs.org/1.4.8/angular.js"></script>
  
  <script  src="https://rawgit.com/angular-ui/ui-router/0.2.11/release/angular-ui-router.js"></script>
  
</head>
<body ng-app="myApp" class="container">
  <div class="row">
    <div class="col-md-12">
      <div class="well">
        
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-md-12">
      <div class="well" ui-view></div>
    </div>
  </div>
<script type="text/ng-template" id="maintplhtml">
 <input type="checkbox" ng-model="vm.isAllCheck" ng-change="vm.toggleIsAllCheck()"/>
<input   placeholder="What needs to be done?" ng-model="vm.newTodo" auto2focus enter-new-todo="vm.addTodo()"/>
<ul>
  <li ng-repeat="todo in vm.todos|filter:vm.statusFilter track by $index" ng-class="{completed:todo.completed,editing:vm.isTheEdited(todo)}">
    <div ng-hide="vm.isTheEdited(todo)">
      <input class="toggle" type="checkbox" ng-model="todo.completed">
      <label ng-dblclick="vm.editTodo(todo)">{{todo.title}}</label>
      <button class="destroy" ng-click="vm.removeTodo(todo)">X</button>
    </div>
    <input focus-when="vm.isTheEdited(todo)" ng-enter ng-blur="vm.editedTodo=null"  current="vm.editedTodo" ng-show="vm.isTheEdited(todo)" ng-trim="false" ng-model="todo.title" todo-escape="revertEditing(todo)"  >
  </li>
</ul>
<hr>
<div id='todo-count'>
  <br> total: <strong ng-bind=" vm.total"></strong>
  <br> completed: <strong ng-bind=" vm.completed"></strong>
  <br> remaining: <strong ng-bind="vm.remaining"></strong>
</div>
<hr>
<ul id="filters">
  <li>
    <a ng-click="vm.statusFilter={completed:''}" href="#">All</a>
  </li>
  
  <li>
    <a ng-click="vm.statusFilter={completed:true}" href="#">Completed</a>
  </li>
</ul>
</script>
</body>
</html>
 
#filters {
    margin: 0;
    padding: 0;
    list-style: none;
    right: 0;
    left: 0;
}
#filters li {
    display: inline;
}
#filters li a {
    color: #83756f;
    margin: 2px;
    text-decoration: none;
}
#filters li a.selected {
    font-weight: bold;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers