Skip to content

Commit 9e6a7dd

Browse files
committed
simple Angular demi app
1 parent 9825225 commit 9e6a7dd

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

demo/demo-angular.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html ng-app="demoApp">
3+
<head>
4+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0-rc.2/angular.min.js"></script>
5+
<script src="demo-angular.js"></script>
6+
</head>
7+
<body>
8+
<h2>Todo</h2>
9+
<div ng-controller="DemoController as demo">
10+
<form ng-submit="demo.triggerCrash()">
11+
<input type="text" ng-model="demo.customText" size="30"
12+
placeholder="add custom text here">
13+
<input class="btn-primary" type="submit" value="Crash">
14+
</form>
15+
</div>
16+
</body>
17+
</html>

demo/demo-angular.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
angular.module('demoApp', [])
2+
.controller('DemoController', function() {
3+
var demo = this;
4+
demo.customText = '';
5+
6+
demo.triggerCrash = function() {
7+
console.log('crash', demo.customText);
8+
};
9+
});

0 commit comments

Comments
 (0)