Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<div class="container" ng-controller="myCtrl">
  <div>
          <table>
              <tr>
                  <th>add</th>
                  <th>edit</th>
                  <th>delete</th>
              </tr>
              <tr ng-repeat="category in categories" ng-click="setCurrentCategory(category)">
                  <td><input id="{{category.id + '_add'}}" ng-model="selection_add[category.id]" type="text">{{category.name}}</td>
                  <td><input id="{{category.id + '_edit'}}" ng-model="selection_edit[category.id]" type="text">{{category.name}}</td>
                  <td><input id="{{category.id + '_delete'}}" ng-model="selection_delete[category.id]" type="text">{{category.name}}</td>
              </tr>
          </table>
    
        <h1>Add for {{currentCategory.name}}</h1>
        <input type="text" ng-model="selection_add[currentCategory.id]">
        <h1>Edit for {{currentCategory.name}}</h1>
        {{selection_edit[currentCategory.id]}}
        <h1>Delete for {{currentCategory.name}}</h1>
        {{selection_delete[currentCategory.id]}}
      </div>
</div>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers