-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSignUp-angular.html
62 lines (58 loc) · 1.53 KB
/
SignUp-angular.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SignUp</title>
<style>
table {
width: 200px;
height: 200px;
margin: 100px auto;
}
div {
width: 100%;
}
div input{
width: 66px;
height: 22px;
margin: 0 auto;
display:block;
}
</style>
<script src="node_modules/angular/angular.min.js"></script>
</head>
<body>
<table ng-app="myApp" ng-controller="myController">
<tr>
<td>姓名</td>
<td><input type="text" ng-model="user.name"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password"></td>
</tr>
<tr>
<td>Hello</td>
<td>{{user.name}}</td>
</tr>
</table>
<div ng-app="myApp2" ng-controller="myController2">
<input type="button" value="myApp2" ng-click="do2()">
</div>
<script>
var myApp = angular.module('myApp',[]);
myApp.controller('myController',['$scope',function ($scope) {
$scope.user={
name:'ww'
}
}]);
var myApp2 = angular.module('myApp2',[]);
myApp2.controller('myController2',['$scope',function ($scope) {
$scope.do2 = function () {
console.log('hello,world');
}
}]);
angular.bootstrap(document.querySelector('[ng-app="myApp2"]'),['myApp2'])
</script>
</body>
</html>