Library
This page shows all books in the library. The demo uses [[ng-entity] to declare a Book as an entity. The ng code after initialization ng-init, retrieves count of all books Entity.all(), and finally by iteration completes list of all books ng-repeat.
The library has {{books.length}} books.
[
Add a Book ]
The library has {{books.length}} books.
[
Add a Book ]
<html>
<head>
<script type="text/javascript"
src="http://angular.getangular.com/angular-1.0a.js#database=docsdb"></script>
</head>
<body>
The library has {{books.length}} books. <br>
[ <a href="/Demo:Book">Add a Book</a> ] <br>
<ul ng-entity="Book" ng-init="books = Book.all()">
<li ng-repeat="book in books">
<a href="/Demo:Book#book={{book.$id}}">{{book.title}}</a> by {{book.author}}
</li>
</ul>
</body>
</html>