{"id":1319,"date":"2013-03-15T14:05:42","date_gmt":"2013-03-15T05:05:42","guid":{"rendered":"https:\/\/www.glad-cube.com\/blog\/?p=1319"},"modified":"2021-03-11T15:25:07","modified_gmt":"2021-03-11T06:25:07","slug":"%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%e3%81%8c%e5%88%86%e3%81%8b%e3%82%89%e3%81%aa%e3%81%84%e4%ba%ba%e3%81%a7%e3%82%82%e7%b0%a1%e5%8d%98%e3%81%aaweb%e3%82%a2%e3%83%97","status":"publish","type":"post","link":"https:\/\/www.glad-cube.com\/blog\/?p=1319","title":{"rendered":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u5206\u304b\u3089\u306a\u3044\u4eba\u3067\u3082\u7c21\u5358\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308c\u3061\u3083\u3046\uff01\uff1fJavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300eAngularJS\u300f"},"content":{"rendered":"<p><a rel=\"author\" href=\"https:\/\/plus.google.com\/110460594359314925286?rel=author\"><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.clipular.com\/c?2628070=wlWmcefPsWsGDfUNRXb1153uY7Y&#038;f=8c3df8086aff6e1136650ed0c37bb40b\" title=\"AngularJS\" class=\"alignnone\" width=\"510\" height=\"242\" \/><\/p>\n<p>\u300c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306f\u5206\u304b\u3089\u306a\u3044\u3051\u3069\u3001<br \/>\n\u7c21\u5358\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u3002\u300d<\/p>\n<p>\u300cHTML\u30fbCSS\u306f\u5206\u304b\u308b\u3051\u3069\u3001<br \/>\nJavaScript\u304c\u82e6\u624b\u3060\u304b\u3089\u4f55\u3068\u304b\u3057\u305f\u3044\u3002\u300d<\/p>\n<p>\u300c\u81ea\u5206\u306e\u4f5c\u3063\u305f\u30b5\u30a4\u30c8\u306b\u3001<br \/>\n\u3061\u3087\u3063\u3068\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8981\u7d20\u3092\u5165\u308c\u305f\u3044\u3002\u300d<\/p>\n<p>\u305d\u3093\u306a\u30cb\u30fc\u30ba\u306b\u304a\u5fdc\u3048\u3057\u3066\u304f\u308c\u308b\u306e\u304c\u3001<br \/>\n\u4eca\u56de\u7d39\u4ecb\u3055\u305b\u3066\u3044\u305f\u3060\u304f<strong>\u300cAngularJS\u300d<\/strong>\uff08\u30a2\u30f3\u30ae\u30e5\u30e9\u30fc\u30b8\u30a7\u30a4\u30a8\u30b9\uff09\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>AngularJS\u3063\u3066\uff1f<\/h4>\n<p>\u7c21\u5358\u306b\u8a00\u3048\u3070<br \/>\n\u300cHTML\u306e\u30bf\u30b0\u3092\u62e1\u5f35\u3055\u305b\u308bJavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300d\u3067\u3059\u304c\u30fb\u30fb\u30fb\u3001<br \/>\n\u3088\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u3088\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u4eca\u56de\u306f\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066<br \/>\nTodo\u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u6163\u308c\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u81ea\u4fe1\u304c\u306a\u3044\u3068\u3044\u3046\u65b9\u3082\u5927\u4e08\u592b\uff01<\/p>\n<p>\u3068\u306b\u304b\u304f\u66f8\u304f\u30b3\u30fc\u30c9\u91cf\u304c\u5c11\u306a\u3044\u3067\u3059\u3002<br \/>\n\u9806\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u306f<a href=\"\/blog\/sample\/todoapp.html\" target=\"_blank\">\u30b5\u30f3\u30d7\u30eb\u306e\u5b8c\u6210\u5f62<\/a>\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>ToDo\u30a2\u30d7\u30ea\u5b8c\u6210\u5f62<\/h3>\n<p><a href=\"\/blog\/sample\/todoapp.html\" target=\"_blank\"><br \/>\n  <img decoding=\"async\" src=\"http:\/\/www.clipular.com\/c?2807010=RCVtQbNXLoiFV1C8mcwsZ5vUwWY&#038;f=0d2cca9869fce933e3a75a1d98ee3e8e\" style=\"box-shadow:3px 3px 10px 3px rgba(0,0,0,0.4);border-radius:4px;\"><br \/>\n<\/a><\/p>\n<p>\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u304c\u3001<br \/>\n\u308c\u3063\u304d\u3068\u3057\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\uff01<\/p>\n<p>\u3053\u308c\u3092\u4eca\u304b\u3089\u4e00\u7dd2\u306b\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306a\u304a\u3001HTML\u30fbCSS\u304c\u3042\u308b\u7a0b\u5ea6<br \/>\n\u3054\u5b58\u77e5\u306e\u65b9\u3092\u524d\u63d0\u306b\u8aac\u660e\u3055\u305b\u3066\u9802\u304d\u307e\u3059\u304c\u3001<br \/>\n\u3053\u308c\u3089\u306e\u77e5\u8b58\u304c\u306a\u3044\u65b9\u3082\u30de\u30cd\u3057\u3066\u66f8\u3044\u3066\u9802\u3044\u305f\u3089<br \/>\n\u5b8c\u6210\u3057\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u5fc5\u8981\u306a\u3082\u306e<\/h4>\n<ul>\n<li>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u30fc\uff08\u30e1\u30e2\u5e33\u3067\u3082\u4f55\u3067\u3082OK\uff09<\/li>\n<li>\u30d6\u30e9\u30a6\u30b6<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u3067\u3059\u3002\u306a\u306e\u3067\u3001\u6700\u521d\u304b\u3089\u63c3\u3063\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>\u624b\u9806\uff11\uff0e\u307e\u305a\u306f\u898b\u305f\u76ee\uff08\u30ec\u30a4\u30a2\u30a6\u30c8\uff09\u3060\u3051\u4f5c\u3063\u3066\u307f\u3088\u3046<\/h3>\n<p>[html]<br \/>\n&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&quot;ja&quot;&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div&gt;<br \/>\n  &lt;h2&gt;Todo 3\u4ef6&lt;\/h2&gt;<br \/>\n  &lt;div&gt;<br \/>\n    [ &lt;a href=&quot;&quot;&gt;\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb&lt;\/a&gt; ]<br \/>\n    &lt;ul&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u8179\u7b4b100\u56de&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n    &lt;form&gt;<br \/>\n      &lt;input type=&quot;text&quot; size=&quot;30&quot; placeholder=&quot;Todo\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002&quot;&gt;<br \/>\n      &lt;input type=&quot;submit&quot; value=&quot;Todo\u8ffd\u52a0&quot;&gt;<br \/>\n    &lt;\/form&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u3001<br \/>\n\u3068\u308a\u3042\u3048\u305a\u898b\u305f\u76ee\u306f\u5b8c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3054\u5b58\u77e5\u306e\u3068\u304a\u308a\u3001<br \/>\n\u3053\u308c\u3067\u306fTodo\u306e\u8ffd\u52a0\u3082\u3067\u304d\u306a\u3044\u3057\u3001\u524a\u9664\u3082\u3067\u304d\u306a\u3044\u3057\u3001<br \/>\n\u5b8c\u4e86\u6e08\u306b\u3082\u3067\u304d\u306a\u3044\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u3055\u3041\u3001\u3053\u3053\u304b\u3089\u5c11\u3057\u305a\u3064\u624b\u3092\u52a0\u3048\u3066<br \/>\nTodo\u30a2\u30d7\u30ea\u306b\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"\/blog\/sample\/todoapp0.html\" target=\"_blank\">&gt;&gt;\u3053\u3053\u307e\u3067\u306e\u7d50\u679c<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>\u624b\u9806\uff12\uff0eAngularJS\u3092\u4f7f\u3046\u305f\u3081\u306e\u6e96\u5099\uff08AngularJS\u306e\u8aad\u307f\u8fbc\u307f\u3001ng-app\u306e\u5ba3\u8a00\uff09<\/h3>\n<p>[html]<br \/>\n&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&quot;ja&quot; ng-app&gt; \u203b2<br \/>\n&lt;head&gt;<br \/>\n&lt;script src=&quot;  \u203b1<br \/>\n    https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.0.5\/angular.min.js&quot;&gt;<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div&gt;<br \/>\n  &lt;h2&gt;Todo 3\u4ef6&lt;\/h2&gt;<br \/>\n  &lt;div&gt;<br \/>\n    [ &lt;a href=&quot;&quot;&gt;\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb&lt;\/a&gt; ]<br \/>\n    &lt;ul&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u8179\u7b4b100\u56de&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n    &lt;form&gt;<br \/>\n      &lt;input type=&quot;text&quot; size=&quot;30&quot; placeholder=&quot;Todo\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002&quot;&gt;<br \/>\n      &lt;input type=&quot;submit&quot; value=&quot;Todo\u8ffd\u52a0&quot;&gt;<br \/>\n    &lt;\/form&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>\u3055\u3066\u3001AngularJS\u3092\u4f7f\u3046\u305f\u3081\u306b\u306f\u5f53\u7136<br \/>\nAngularJS\u3092\u8aad\u307f\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u203b1<\/p>\n<p>\u307e\u305f\u3001\u5192\u982d\u3067\u3082\u8aac\u660e\u3057\u305f\u3068\u304a\u308a\u3001<br \/>\nAngularJS\u306f\u300cHTML\u306e\u30bf\u30b0\u3092\u62e1\u5f35\u300d\u3057\u307e\u3059\u3002<\/p>\n<p>\u5c5e\u6027\u300cng-app\u300d\u3092html\u30bf\u30b0\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u203b2<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u3001\u7686\u3055\u3093\u304c\u6163\u308c\u89aa\u3057\u3093\u3060<br \/>\nHTML\u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3055\u305b\u3066\u3044\u304f\u306e\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u300cng-app\u300d\u306f\u300c\u30a2\u30f3\u30ae\u30e5\u30e9\u30fc\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3088\u300d\u3068\u3044\u3046\u5ba3\u8a00\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001ng\u306fA<strong>ng<\/strong>ularJS\u306eng\u3060\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067AngularJS\u3092\u4f7f\u3046\u6e96\u5099\u306f\u30d0\u30c3\u30c1\u30ea\u3067\u3059\u3002<br \/>\n<a href=\"\/blog\/sample\/todoapp1.html\" target=\"_blank\">&gt;&gt;\u3053\u3053\u307e\u3067\u306e\u7d50\u679c<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>\u624b\u9806\uff13\uff0e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f7f\u3063\u3066Todo\u3092\u52d5\u7684\u306b<\/h3>\n<p>\u3053\u3053\u304b\u3089\u304c\u672c\u756a\u3067\u3059\u3002<\/p>\n<p>[html]<br \/>\n&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&quot;ja&quot; ng-app&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.0.5\/angular.min.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div ng-controller=&quot;TodoController&quot;&gt; \u203b3<br \/>\n  &lt;h2&gt;Todo {{todos.length}}\u4ef6&lt;\/h2&gt;\u3000\u203b6<br \/>\n  &lt;div&gt;<br \/>\n    [ &lt;a href=&quot;&quot; ng-click=&quot;clear()&quot;&gt;\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb&lt;\/a&gt; ]<br \/>\n    &lt;ul&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u8179\u7b4b100\u56de&lt;\/li&gt;<br \/>\n      &lt;li&gt;&lt;input type=&quot;checkbox&quot;&gt;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n    &lt;form&gt;<br \/>\n      &lt;input type=&quot;text&quot; size=&quot;30&quot; placeholder=&quot;Todo\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002&quot;&gt;<br \/>\n      &lt;input type=&quot;submit&quot; value=&quot;Todo\u8ffd\u52a0&quot;&gt;<br \/>\n    &lt;\/form&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;script&gt;<br \/>\n\/\/Todo\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<br \/>\nfunction TodoController($scope) { \u203b4<br \/>\n  $scope.todos = [                \u203b5<br \/>\n    {text:&#8217;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&#8217;, done:true},<br \/>\n    {text:&#8217;\u8179\u7b4b100\u56de&#8217;, done:false},<br \/>\n    {text:&#8217;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&#8217;, done:false}<br \/>\n  ];<br \/>\n}<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>\u307e\u305a\u52d5\u7684\u306b\u3057\u305f\u3044\u90e8\u5206\u306b\u5bfe\u3057\u3066<br \/>\n\u300cng-controller\u300d\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002\u203b3<\/p>\n<p>\u3053\u308c\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u3067\u3001<br \/>\n\u5bfe\u5fdc\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u3066\u7d30\u304b\u3044\u8abf\u6574\u3092<br \/>\nJavaScript\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3069\u3046\u3044\u3046\u3053\u3068\u3092\u3059\u308b\u304b\u3001<br \/>\n\u306b\u3064\u3044\u3066\u306fJavaScript\u3067\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002 \u203b4<\/p>\n<p>\u3088\u304f\u5206\u304b\u3089\u306a\u304f\u3066\u3082\u3001<br \/>\n\u3068\u308a\u3042\u3048\u305a\u4e0a\u8a18\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b<br \/>\n\u66f8\u3044\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u5927\u4e08\u592b\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5148\u307b\u3069\u307e\u3067HTML\u3067\u9759\u7684\u306bToDo\u3092\uff13\u3064\u4e26\u3079\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3092\u4e00\u65e6\u3001JavaScript\u306e\u914d\u5217\u306b\u5165\u308c\u307e\u3057\u3087\u3046\u3002\u203b5<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u300ctodo\u300d\u306e\u8907\u6570\u5f62\u300ctodos\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u914d\u5217\u306b\u3001<br \/>\nTodo\uff13\u3064\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u914d\u5217\u3068\u3044\u3046\u306e\u306f\u30c7\u30fc\u30bf\u3092<br \/>\n\u9806\u306b\u5165\u308c\u3066\u3044\u304f\u7bb1\u306e\u3088\u3046\u306a\u3082\u306e\u3060\u3068\u601d\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3055\u3066\u3001$scope\u3068\u3044\u3046\u306e\u304c\u3042\u308a\u307e\u3059\u304c\u3001<br \/>\n\u3053\u308c\u306f\u3053\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u53ca\u3076\u7bc4\u56f2\uff08\u30b9\u30b3\u30fc\u30d7\uff09\u3092\u6271\u3046\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001$scope.todos\u306b\u4eca\u56de<br \/>\ntodo3\u500b\u306e\u914d\u5217\u3092\u5165\u308c\u307e\u3057\u305f\u3002\u203b5<\/p>\n<p>\u3053\u3046\u3059\u308c\u3070\u3001Todo\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u7bc4\u56f2\u5185\uff08\u4eca\u56de\u306fdiv\uff09\u3067<br \/>\n\u3053\u306e\u914d\u5217\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u203b6\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3053\u3053\u3067\u3001{{todos.length}}\u3068\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c{{\u300d\u3068\u300c}}\u300d\u3067\u56f2\u3080\u3053\u3068\u306b\u3088\u3063\u3066\u3001<br \/>\n\u5148\u307b\u3069\u5ba3\u8a00\u3057\u305ftodos\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>JavaScript\u3067\u306f\u3001\u914d\u5217\u5185\u306e\u500b\u6570\u3092length\u3067\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u3001<br \/>\n\u4eca\u306ftodos\u306b\u30c7\u30fc\u30bf\u304c3\u500b\u5165\u3063\u3066\u3044\u308b\u306e\u3067<br \/>\ntodos.length\u306f3\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>{{todos.length}} \u2192\u30003<\/p>\n<p><a href=\"\/blog\/sample\/todoapp2.html\" target=\"_blank\">&gt;&gt;\u3053\u3053\u307e\u3067\u306e\u7d50\u679c<\/a><\/p>\n<h3>\u624b\u9806\uff14\uff0eng-repeat\u3067\u7e70\u308a\u8fd4\u3057\u51e6\u7406<\/h3>\n<p>[html]<br \/>\n&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&quot;ja&quot; ng-app&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.0.5\/angular.min.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div ng-controller=&quot;TodoController&quot;&gt;<br \/>\n  &lt;h2&gt;Todo {{todos.length}}\u4ef6&lt;\/h2&gt;<br \/>\n  &lt;div&gt;<br \/>\n    [ &lt;a href=&quot;&quot; ng-click=&quot;clear()&quot;&gt;\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb&lt;\/a&gt; ]<br \/>\n    &lt;ul&gt;<br \/>\n      &lt;li ng-repeat=&quot;todo in todos&quot;&gt; \u203b7<br \/>\n        &lt;input type=&quot;checkbox&quot; ng-model=&quot;todo.done&quot;&gt;\u3000\u203b9<br \/>\n        &lt;span class=&quot;done-{{todo.done}}&quot;&gt;{{todo.text}}&lt;\/span&gt;\u3000\u203b8<br \/>\n      &lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n    &lt;form&gt;<br \/>\n      &lt;input type=&quot;text&quot; size=&quot;30&quot; placeholder=&quot;Todo\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002&quot;&gt;<br \/>\n      &lt;input type=&quot;submit&quot; value=&quot;Todo\u8ffd\u52a0&quot;&gt;<br \/>\n    &lt;\/form&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;script&gt;<br \/>\n\/\/Todo\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<br \/>\nfunction TodoController($scope) {<br \/>\n  $scope.todos = [<br \/>\n    {text:&#8217;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&#8217;, done:true},<br \/>\n    {text:&#8217;\u8179\u7b4b100\u56de&#8217;, done:false},<br \/>\n    {text:&#8217;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&#8217;, done:false}<br \/>\n  ];<br \/>\n}<br \/>\n&lt;\/script&gt;<br \/>\n&lt;style&gt;<br \/>\n.done-true {\u3000\u203b10<br \/>\n  text-decoration: line-through;<br \/>\n  color: #bbb;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>\u5148\u307b\u3069todos\u3068\u3044\u3046\u914d\u5217\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3053\u306b\u306ftodo\u304c\u521d\u671f\u5024\u3068\u3057\u30663\u3064\u5165\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u3053\u308c\u3092\u4f7f\u3063\u3066\u3001<br \/>\n\u52d5\u7684\u306b\u30ea\u30b9\u30c8\u3092\u751f\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u203b7\u306e\u3088\u3046\u306b\u3001\u7e70\u308a\u8fd4\u3057\u305f\u3044\u30bf\u30b0\uff08\u4eca\u56de\u306fli\uff09\u306b<br \/>\n\u300cng-repeat=&#8221;todo in todos&#8221;\u300d\u3068\u3044\u3046\u5c5e\u6027\u3092\u8db3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u306f\u300ctodos\u3068\u3044\u3046\u914d\u5217\u306b\u5165\u3063\u3066\u3044\u308btodo\u306e\u6570\u3060\u3051\u7e70\u308a\u8fd4\u3059\u3088\u300d<br \/>\n\u3068\u3044\u3046\u5ba3\u8a00\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u66f8\u3044\u305fli\u306f\u4e00\u3064\u3067\u3082\u3001<br \/>\ntodos\u5185\u306e\u6570\u3060\u3051li\u304c\u5897\u6b96\u3055\u308c\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u305d\u3057\u3066\u5404todo\u306e\u5185\u5bb9\u3001<br \/>\n\u51e6\u7406\u72b6\u6cc1\u3092\u203b8\u3067\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\uff09\u4e00\u3064\u76ee\u306eToDo<br \/>\n\u5185\u5bb9\uff1a\u3000{{todo.text}} \u2192 \u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165<br \/>\n\u51e6\u7406\u72b6\u6cc1\uff1a\u3000{{todo.done}} \u2192\u3000true\uff08\u5b8c\u4e86\u6e08\uff09<\/p>\n<p>\u3053\u3053\u3067\u4e00\u5de5\u592b\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u203b9\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306b\u300cng-model=&#8221;todo.done&#8221;\u300d\u3068\u3044\u3046<br \/>\n\u5c5e\u6027\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u30c1\u30a7\u30c3\u30af\u306e<br \/>\n\u6709\u7121\uff08TRUE\u3000or\u3000FALSE\uff09\u304c\u3001<br \/>\ntodo.done\u3059\u306a\u308f\u3061ToDo\u306e\u51e6\u7406\u72b6\u6cc1\u306b\u30ea\u30f3\u30af\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u203b10\u306b\u3066\u51e6\u7406\u72b6\u6cc1\u304c<br \/>\n\u5b8c\u4e86\u6e08\u306e\u5834\u5408\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\uff08\u6587\u5b57\u306e\u4e0a\u306b\u6a2a\u7dda\u30fb\u8272\u8584\u304f\uff09<\/p>\n<p><a href=\"\/blog\/sample\/todoapp3.html\" target=\"_blank\">&gt;&gt;\u3053\u3053\u307e\u3067\u306e\u7d50\u679c<\/a><\/p>\n<h4>\uff08\u6700\u5f8c\uff09\u624b\u9806\uff15\uff0eToDo\u8ffd\u52a0\u6a5f\u80fd\u3068\u3001\u5b8c\u4e86\u6e08ToDo\u524a\u9664\u6a5f\u80fd\u3092\u8ffd\u52a0<\/h4>\n<p>[html]<br \/>\n&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&quot;ja&quot; ng-app&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.0.5\/angular.min.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;div ng-controller=&quot;TodoController&quot;&gt;<br \/>\n  &lt;h2&gt;Todo &lt;span&gt;{{todos.length}}\u4ef6&lt;\/span&gt;&lt;\/h2&gt;<br \/>\n  &lt;div&gt;<br \/>\n    [ &lt;a href=&quot;&quot; ng-click=&quot;clear()&quot;&gt;\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb&lt;\/a&gt; ]\u3000\u203b14<br \/>\n    &lt;ul&gt;<br \/>\n      &lt;li ng-repeat=&quot;todo in todos&quot;&gt;<br \/>\n        &lt;input type=&quot;checkbox&quot; ng-model=&quot;todo.done&quot;&gt;<br \/>\n        &lt;span class=&quot;done-{{todo.done}}&quot;&gt;{{todo.text}}&lt;\/span&gt;<br \/>\n      &lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n    &lt;form ng-submit=&quot;addTodo()&quot;&gt;\u3000\u203b11<br \/>\n      &lt;input type=&quot;text&quot; ng-model=&quot;text&quot;  size=&quot;30&quot; placeholder=&quot;Todo\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002&quot;&gt;\u3000\u203b13<br \/>\n      &lt;input type=&quot;submit&quot; value=&quot;Todo\u8ffd\u52a0&quot;&gt;<br \/>\n    &lt;\/form&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/div&gt;<\/p>\n<p>&lt;script&gt;<br \/>\nfunction TodoController($scope) {<\/p>\n<p>  $scope.todos = [<br \/>\n    {text:&#8217;\u30b7\u30e3\u30f3\u30d7\u30fc\u8cfc\u5165&#8217;, done:true},<br \/>\n    {text:&#8217;\u8179\u7b4b100\u56de&#8217;, done:false},<br \/>\n    {text:&#8217;\u30e4\u30de\u30c0\u3055\u3093\u3068\u4f1a\u98df&#8217;, done:false}<br \/>\n  ];<\/p>\n<p>  $scope.addTodo = function() {\u3000\u3000\u203b12<br \/>\n    if($scope.text){<br \/>\n\t    $scope.todos.push({text:$scope.text, done:false});<br \/>\n\t    $scope.text = &#8221;;<br \/>\n\t}<br \/>\n  };<\/p>\n<p>  $scope.clear = function() {\u3000\u3000\u203b15<br \/>\n    var oldTodos = $scope.todos;<br \/>\n    $scope.todos = [];<br \/>\n    angular.forEach(oldTodos, function(todo) {<br \/>\n      if (!todo.done) $scope.todos.push(todo);<br \/>\n    });<br \/>\n  };<\/p>\n<p>}<br \/>\n&lt;\/script&gt;<br \/>\n&lt;style&gt;<br \/>\n.done-true {<br \/>\n  text-decoration: line-through;<br \/>\n  color: #bbb;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>\u6700\u5f8c\u306b\u8ffd\u52a0\u6a5f\u80fd\u3068\u524a\u9664\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u8ffd\u52a0\u6a5f\u80fd\u3002<\/p>\n<p>\u203b11\u306b\u3066\u3001\u300cng-submit=&#8221;addTodo()&#8221;\u300d\u3067<br \/>\n\u30d5\u30a9\u30fc\u30e0\u304c\u30b5\u30d6\u30df\u30c3\u30c8\u3055\u308c\u305f\u6642\u306e\u51e6\u7406\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306eaddTodo\u306e\u4e2d\u8eab\u3067\u3059\u304c\u3001<br \/>\n\u203b12\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001<br \/>\n\u300c\u3082\u3057text\u306e\u4e2d\u8eab\u304c\u3061\u3083\u3093\u3068\u5165\u3063\u3066\u3044\u308b\u306a\u3089\u3001<br \/>\n\u3000todos\u306b\u65b0\u305f\u306btodo\uff08\u5185\u5bb9\u306f\u30d5\u30a9\u30fc\u30e0\u306etext\u3001\u51e6\u7406\u72b6\u6cc1\u306f\u672a\u51e6\u7406\uff09\u3092\u8ffd\u52a0\u3057\u3001<br \/>\n\u3000\u30d5\u30a9\u30fc\u30e0\u306etext\u3092\u7a7a\u3063\u307d\u306b\u3059\u308b\u3002\u300d<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b13\u306e\u300cng-model=&#8221;text&#8221;\u300d\u306b\u3088\u3063\u3066\u3001<br \/>\n\u30d5\u30a9\u30fc\u30e0\u306e\u30c6\u30ad\u30b9\u30c8\u5165\u529b\u6b04\u3092\u300ctext\u300d\u3068\u3057\u3066\u3001<br \/>\n\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30b9\u30b3\u30fc\u30d7\u3068\u7d50\u3073\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u6b21\u306b\u524a\u9664\u6a5f\u80fd\u3002<\/p>\n<p>\u203b14\u306e\u3068\u304a\u308a\u3001\u300c\u5b8c\u4e86\u6e08\u3092\u6d88\u53bb\u300d\u3068\u3044\u3046<br \/>\n\u6587\u5b57\u5217\u30ea\u30f3\u30af\u306b\u5bfe\u3057\u3066\u300cng-click=&#8221;clear()&#8221;\u300d\u3068\u66f8\u3044\u3066\u3001<br \/>\n\u524a\u9664\u6a5f\u80fd\u3068\u7d50\u3073\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306eclear\u306e\u4e2d\u8eab\u306f\u203b15\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001<br \/>\n\u300c\u307e\u305a\u4eca\u306etodos\u306e\u4e2d\u8eab\u3092oldTodos\u306b\u79fb\u3057\u66ff\u3048\u308b\u3002<br \/>\n\u3000\u6b21\u306btodos\u3092\u7a7a\u306e\u914d\u5217\u306b\u3059\u308b\u3002<br \/>\n\u3000\u305d\u3057\u3066oldTodos\u306e\u4e2d\u8eab\u30921\u3064\u305a\u3064\u8abf\u3079\u3066\u3001<br \/>\n\u3000\u672a\u51e6\u7406\u306e\u3082\u306e\u3060\u3051\u6539\u3081\u3066todos\u306e\u4e2d\u306b\u5165\u308c\u3066\u3044\u304f\u3002\u300d<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3066<a href=\"\/blog\/sample\/todoapp.html\" target=\"_blank\">\u5b8c\u6210<\/a>\uff01<\/p>\n<p>&nbsp;<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>AngularJS\u3001\u672c\u5f53\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u8a18\u4e8b\u304c\u3001\u3053\u3046\u3044\u3063\u305f\u30b7\u30f3\u30d7\u30eb\u306a<br \/>\nWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u307f\u308b\u304d\u3063\u304b\u3051\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u308c\u3092\u8e0f\u307f\u53f0\u3068\u3057\u3066<br \/>\n\u3088\u308a\u672c\u683c\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3078\u3068\u6b69\u307f\u51fa\u3055\u3055\u308c\u308b\u3068\u3001<br \/>\n\u3053\u308c\u306b\u52dd\u308b\u559c\u3073\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>AngularJS\u306f\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u9593\u3082\u306a\u3044\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u306e\u3067\u3001<br \/>\n\u307e\u3060\u65e5\u672c\u3067\u306f\u4f7f\u7528\u4f8b\u304c\u307b\u3068\u3093\u3069\u306a\u3044\u3067\u3059\u3002<\/p>\n<p>\u30b0\u30e9\u30c3\u30c9\u30ad\u30e5\u30fc\u30d6\u3067\u958b\u767a\u4e2d\u306e<br \/>\nLPO\u30c4\u30fc\u30eb\u3067\u306f\u4e00\u90e8\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3042\u306a\u305f\u3082\u4e00\u7dd2\u306bAngularJS\u306e\u5148\u99c6\u8005\u306b\u306a\u308a\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306f\u5206\u304b\u3089\u306a\u3044\u3051\u3069\u3001 \u7c21\u5358\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u3002\u300d \u300cHTML\u30fbCSS\u306f\u5206\u304b\u308b\u3051\u3069\u3001 JavaScript\u304c\u82e6\u624b\u3060\u304b\u3089\u4f55\u3068\u304b\u3057\u305f\u3044\u3002\u300d \u300c\u81ea\u5206\u306e\u4f5c\u3063\u305f\u30b5\u30a4\u30c8\u306b\u3001 \u3061\u3087\u3063\u3068\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8981\u7d20\u3092\u5165\u308c\u305f\u3044\u3002\u300d \u305d\u3093\u306a\u30cb\u30fc\u30ba\u306b\u304a\u5fdc\u3048\u3057\u3066\u304f\u308c\u308b\u306e\u304c\u3001 \u4eca\u56de\u7d39\u4ecb\u3055\u305b\u3066\u3044\u305f\u3060\u304f\u300cAngularJS\u300d\uff08\u30a2\u30f3\u30ae\u30e5\u30e9\u30fc\u30b8\u30a7\u30a4\u30a8\u30b9\uff09\u3067\u3059\u3002 &nbsp; AngularJS\u3063\u3066\uff1f \u7c21\u5358\u306b\u8a00\u3048\u3070 \u300cHTML\u306e\u30bf\u30b0\u3092\u62e1\u5f35\u3055\u305b\u308bJavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300d\u3067\u3059\u304c\u30fb\u30fb\u30fb\u3001 \u3088 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[138],"tags":[],"post-author":[],"class_list":["post-1319","post","type-post","status-publish","format-standard","hentry","category-gladcube"],"aioseo_notices":[],"modified_by":"gladcube blog","_links":{"self":[{"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1319"}],"version-history":[{"count":47,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1319\/revisions"}],"predecessor-version":[{"id":27581,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1319\/revisions\/27581"}],"wp:attachment":[{"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1319"},{"taxonomy":"post-author","embeddable":true,"href":"https:\/\/www.glad-cube.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fpost-author&post=1319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}