Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (58 sloc) 2.21 KB
<!DOCTYPE html>
<html data-ng-app="App">
<head>
<title>AngularJS Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- JavaScript plugins (requires jQuery) -->
<script src="/js/jquery-1.10.2.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/bootstrap/js/bootstrap.min.js"></script>
<!-- AngularJS -->
<script src="/js/angular.min.js"></script>
<script src="/js/app.js"></script>
</head>
<body>
<div class="container" data-ng-controller="Todo">
<div class="row">
<h1>AngularJS Demo - Todo-list </h1>
<hr/>
<form>
<input type="text" data-ng-model="user.name">
<button type="submit" class="btn btn-primary" data-ng-click="save(user)">Save</button>
</form>
</div>
<br/>
<div class="row" data-ng-show="rows.length">
<div class="row col-lg-6">
<table class="table table-bordered">
<thead>
<tr>
<th class="col-1">ID</th>
<th class="col-4">Name</th>
<th class="col-3"></th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="row in rows">
<td>{{ row.id }}</td>
<td data-ng-switch on="row.editMode">
<div data-ng-switch-when=true>
<input type="text" data-ng-model="row.name">
<button type="button" class="btn btn-default" data-ng-click="saveChanges(row)">change</button>
</div>
<div data-ng-switch-default>{{ row.name }}</div>
</td>
<td>
<button class="btn btn-info" data-ng-click="edit(row)">Edit</button>
<button class="btn btn-danger" data-ng-click="remove(row)">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
You can’t perform that action at this time.