質問編集履歴

2

プログラムの修正

2021/01/19 03:44

投稿

yositigu
yositigu

スコア17

test CHANGED
File without changes
test CHANGED
@@ -46,62 +46,6 @@
46
46
 
47
47
  <!doctype html>
48
48
 
49
- <html ng-app="myApp">
50
-
51
- <head>
52
-
53
- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js"></script>
54
-
55
- <script>
56
-
57
- var app = angular.module("myApp", []);
58
-
59
-
60
-
61
- app.controller('HogeCtrl',function($scope){
62
-
63
- $scope.someList = [
64
-
65
- {name: 'foo'},
66
-
67
- {name: 'bar'}
68
-
69
- ];
70
-
71
-
72
-
73
- $scope.remove = function(i){
74
-
75
- $scope.someList.splice(i, 1);
76
-
77
- };
78
-
79
-
80
-
81
- });
82
-
83
- </script>
84
-
85
- </head>
86
-
87
- <body ng-controller="HogeCtrl">
88
-
89
- <div>
90
-
91
- <ul ng-repeat="item in someList">
92
-
93
- <li class="task">{{item.name}}<button ng-click="remove($index)">remove</button></li>
94
-
95
- </ul>
96
-
97
- </div>
98
-
99
- <hr><pre>{{HogeCtrl|json}}</pre><hr>
100
-
101
- </body>
102
-
103
- </html>
104
-
105
49
  ```
106
50
 
107
51
 

1

追記

2021/01/19 03:44

投稿

yositigu
yositigu

スコア17

test CHANGED
File without changes
test CHANGED
@@ -103,3 +103,11 @@
103
103
  </html>
104
104
 
105
105
  ```
106
+
107
+
108
+
109
+
110
+
111
+ http://www.tohoho-web.com/ex/angularjs.html
112
+
113
+ こちらのサイトの最後のサンプルのイメージです。