-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
23 lines (22 loc) · 1003 Bytes
/
index.html
File metadata and controls
23 lines (22 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html ng-app="helloApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello AngularJS - Hello World</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
<script src="app.module.js"></script>
<script src="Libro.factory.js"></script>
<script src="Book.controller.js"></script>
</head>
<body>
<div ng-controller="BookController">
Id: <span ng-bind="book.id"></span> <br/>
Name:<input type="text" ng-model="book.name" /> <br/>
Author: <input type="text" ng-model="book.author" /> <br/>
Is Available: <span ng-bind="book.isAvailable() ? 'Yes' : 'No' "></span> <br/>
<button ng-click="book.remove()">Delete</button> <br/>
<button ng-click="book.update()">Update</button>
<!-- Up to here we saw how to model a data, encapsulate all its methods in one class and share this class between controllers without code duplication -->
</div>
</body>
</html>