Skip to content

Instantly share code, notes, and snippets.

@Veske
Created April 14, 2015 20:41
Show Gist options
  • Select an option

  • Save Veske/db47ee6b7df6ba4faea4 to your computer and use it in GitHub Desktop.

Select an option

Save Veske/db47ee6b7df6ba4faea4 to your computer and use it in GitHub Desktop.
Index.html
<!DOCTYPE html>
<html ng-app="spring-websocket">
<head>
<title>Hello WebSocket</title>
<base href="/">
<title>Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<div class="container" ng-controller="IndexCtrl">
<h1>WebSocket rakendus</h1><br>
<form class="form-horizontal" role="form" ng-submit="addItem(newItem)">
<div class="form-group" ng-repeat="item in items">
<div class="checkbox col-xs-9">
<label>
<input id="checkbox" type="checkbox" ng-model="item.checked" ng-change="updateItem(item)"/>
Text: {{ item.text }} | ID: {{ item.id }}
</label>
</div>
<div class="col-xs-3">
<button id="delete" class="pull-right btn btn-danger" type="button" title="Delete"
ng-click="deleteItem(item)">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</div>
<hr />
<div class="input-group">
<input id="input" type="text" class="form-control" ng-model="newItem"
placeholder="Enter the description..."/>
<span class="input-group-btn">
<button id="submit" class="btn btn-default" type="submit" ng-disabled="!newItem" title="Add">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
</form>
</div>
<script src="lib/sockjs-0.3.4.js"></script>
<script src="lib/stomp.js"></script>
<script src="lib/angular.js"></script>
<script src="lib/angular-resource.js"></script>
<script src="lib/angular-route.js"></script>
<script src="app/app.js"></script>
<script src="app/controller/IndexCtrl.js"></script>
<script src="app/service/Item.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment