Skip to content

Instantly share code, notes, and snippets.

@t8g
Last active December 29, 2015 18:08
Show Gist options
  • Save t8g/7708434 to your computer and use it in GitHub Desktop.
Save t8g/7708434 to your computer and use it in GitHub Desktop.
A very small (and useless) todo app
<html lang="fr">
<head>
<meta charset="utf-8">
</head>
<body ng-app ng-init="users = []">
<ul>
<li ng-repeat="item in users">{{ item }} <a href="" ng-click="users.splice($index, 1)">x</a></li>
</ul>
<input ng-model="item" placeholder="todo"><button ng-click="users.push(item);item='';">Add</button>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment