Skip to content

Commit

Permalink
add demo: index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Hug committed Jan 31, 2016
1 parent 8c58820 commit 3331deb
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Observable Array</title>
</head>
<body>

<!-- observable-array depends on subscribable.js -->
<script src="bower_components/subscribable.js/subscribable.js"></script>
<script src="observable-array.js"></script>

<script style="display: block; white-space: pre;">function log() {
console.log('this: ', this, '\narguments: ', arguments);
}

var nums = new ObservableArray([1,6,4,76,46,3,5,6,3,5,4,33,3]);

nums.on('push', log);

nums.push(8, 7);
</script>
</body>
</html>

0 comments on commit 3331deb

Please sign in to comment.