-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathng测试题.html
51 lines (38 loc) · 853 Bytes
/
ng测试题.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
</head>
<body>
<script>
/*
假设 $scope是在ng中的data中
ng.data={
$scope:{
root:'root'
} ,
$state:{
status:'1'
},
http:{}
}
请实现ng类和ng.controller
*/
ng.controller(function ($scope, $state) {
console.log('$scope=', $scope)
console.log(' $state=', $state)
});
//
ng.controller(function ($state, $scope,) {
console.log('$scope=', $scope)
console.log(' $state=', $state)
});
ng.controller(function (a, $state, b, c, $scope,) {
console.log('$scope=', $scope)
console.log(' $state=', $state)
});
//都输出ng中的data 中的$scope和$state
</script>
</body>
</html>