loopback/example/browser/index.html

45 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<title>My AngularJS App</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css"/>
<link rel="stylesheet" href="app.css"/>
</head>
<body>
<h1 ng-controller="NetworkCtrl">
<input style="font-size: 48px;" type="checkbox" ng-model="network.available" />Online
</h1>
<ul ng-controller="ReplicationCtlr">
<button ng-click="replicate()">Push</button>
<button ng-click="replicateFromRemote()">Pull</button>
<h2 ng-show="conflicts.length">Conflicts:</h2>
<li ng-repeat="conflict in conflicts">
<button ng-click="resolveUsingLocal(conflict)">Use local {{conflict.source.name || "(removed)"}}</button>
<button ng-click="resolveUsingRemote(conflict)">Use remote {{conflict.target.name || "(removed)"}}</button>
</li>
</ul>
<ul ng-controller="ListCtrl">
<li ng-repeat="color in colors" style="color: {{color.name}}">
<form ng-submit="color.save()">
<input placeholder="{{color.name}}" ng-model="color.name" />
{{color.conflict}}
<a href="#" ng-click="color.destroy()">delete</a>
</form>
</li>
<li>
<form ng-submit="add()">
<input placeholder="enter a color" ng-model="newColor" />
</form>
</li>
</ul>
<script src="loopback.js"></script>
<script src="loopback-remote-models.js"></script>
<script src="client.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script>
</body>
</html>