2016-06-11 14 views
0

こんにちは、なぜ私は{{残りの}}の代わりに3を表示しないのですか?エラー: "エラー:$ injector:nomodモジュールが利用できません"。 ここに私のスニペットの仕事が、それは私の側

/index.html 
/app.js 
/MyTodoList.js 
/style.css 

//Inside app.js 
 
var app = angular.module("myapp", []); 
 

 
//Inside MyTodoList.js 
 
app.controller('TodoCtrl', ['$scope', function ($scope) { 
 
\t $scope.remain = 3; 
 
}]);
html, 
 
body { 
 
\t margin: 0; 
 
\t padding: 0; 
 
} 
 

 
button { 
 
\t margin: 0; 
 
\t padding: 0; 
 
\t border: 0; 
 
\t background: none; 
 
\t font-size: 100%; 
 
\t vertical-align: baseline; 
 
\t font-family: inherit; 
 
\t color: inherit; 
 
\t -webkit-appearance: none; 
 
\t -moz-appearance: none; 
 
\t -ms-appearance: none; 
 
\t -o-appearance: none; 
 
\t appearance: none; 
 
} 
 

 
body { 
 
\t font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; 
 
\t line-height: 1.4em; 
 
\t color: #4d4d4d; 
 
\t width: 550px; 
 
\t margin: 0 auto; 
 
\t -webkit-font-smoothing: antialiased; 
 
\t -moz-font-smoothing: antialiased; 
 
\t -ms-font-smoothing: antialiased; 
 
\t -o-font-smoothing: antialiased; 
 
\t font-smoothing: antialiased; 
 
} 
 

 
.sapUiTv, .sapUiBtnS { 
 
\t font: inherit; 
 
\t font-size: inherit; 
 
} 
 

 
#todoapp { 
 
\t background: #fff; 
 
\t background: rgba(255, 255, 255, 0.9); 
 
\t margin: 130px 0 40px 0; 
 
\t border: 1px solid #ccc; 
 
\t position: relative; 
 
\t border-top-left-radius: 2px; 
 
\t border-top-right-radius: 2px; 
 
\t box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 
 
\t \t \t \t 0 25px 50px 0 rgba(0, 0, 0, 0.15); 
 
} 
 

 
#todoapp:before { 
 
\t content: ''; 
 
\t border-left: 1px solid #f5d6d6; 
 
\t border-right: 1px solid #f5d6d6; 
 
\t width: 2px; 
 
\t position: absolute; 
 
\t top: 0; 
 
\t left: 40px; 
 
\t height: 100%; 
 
} 
 

 
#todoapp input::-webkit-input-placeholder { 
 
\t font-style: italic; 
 
} 
 

 
#todoapp input:-moz-placeholder { 
 
\t font-style: italic; 
 
\t color: #a9a9a9; 
 
} 
 

 
#todoapp h1 { 
 
\t position: absolute; 
 
\t top: -120px; 
 
\t width: 100%; 
 
\t font-size: 70px; 
 
\t font-weight: bold; 
 
\t text-align: center; 
 
\t color: #b3b3b3; 
 
\t color: rgba(255, 255, 255, 0.3); 
 
\t text-shadow: -1px -1px rgba(0, 0, 0, 0.2); 
 
\t -webkit-text-rendering: optimizeLegibility; 
 
\t -moz-text-rendering: optimizeLegibility; 
 
\t -ms-text-rendering: optimizeLegibility; 
 
\t -o-text-rendering: optimizeLegibility; 
 
\t text-rendering: optimizeLegibility; 
 
} 
 

 
#header { 
 
\t padding-top: 15px; 
 
\t border-radius: inherit; 
 
} 
 

 
#header:before { 
 
\t content: ''; 
 
\t position: absolute; 
 
\t top: 0; 
 
\t right: 0; 
 
\t left: 0; 
 
\t height: 15px; 
 
\t z-index: 2; 
 
\t border-bottom: 1px solid #6c615c; 
 
\t background: #8d7d77; 
 
\t background: -webkit-gradient(linear, left top, left bottom, from(rgba(132, 110, 100, 0.8)),to(rgba(101, 84, 76, 0.8))); 
 
\t background: -webkit-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8)); 
 
\t background: -moz-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8)); 
 
\t background: -o-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8)); 
 
\t background: -ms-linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8)); 
 
\t background: linear-gradient(top, rgba(132, 110, 100, 0.8), rgba(101, 84, 76, 0.8)); 
 
\t filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#9d8b83', EndColorStr='#847670'); 
 
\t border-top-left-radius: 1px; 
 
\t border-top-right-radius: 1px; 
 
} 
 

 
#main { 
 
\t position: relative; 
 
\t z-index: 2; 
 
\t border-top: 1px dotted #adadad; 
 
} 
 

 
#new-todo, 
 
.sapUiTfBrd.sapUiTfRo.todo, 
 
.sapUiTfBrd.sapUiTfStd.todo { 
 
\t position: relative; 
 
\t margin: 0; 
 
\t margin-right: 153px; 
 
\t width: 100%; 
 
\t font-size: 24px; 
 
\t font-family: inherit; 
 
\t line-height: 1.4em; 
 
\t background-color: transparent; 
 
\t border: 0; 
 
\t outline: none; 
 
\t color: #4D4D4D; 
 
\t padding: 6px; 
 
\t -webkit-box-sizing: border-box; 
 
\t -moz-box-sizing: border-box; 
 
\t -ms-box-sizing: border-box; 
 
\t -o-box-sizing: border-box; 
 
\t box-sizing: border-box; 
 
\t -webkit-font-smoothing: antialiased; 
 
\t -moz-font-smoothing: antialiased; 
 
\t -ms-font-smoothing: antialiased; 
 
\t -o-font-smoothing: antialiased; 
 
\t font-smoothing: antialiased; 
 
} 
 

 
.sapUiTfBrd.sapUiTfStd.todo { 
 
\t border: 1px solid #999; 
 
\t box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); 
 
} 
 

 
.sapUiTfBrd.sapUiTfRo.todo[data-completed="true"] { 
 
\t color: #a9a9a9; 
 
\t text-decoration: line-through; 
 
} 
 

 
#toggle-all { 
 
\t display: block; 
 
\t outline: none; 
 
} 
 

 
#toggle-all input { 
 
\t z-index: 3; 
 
\t position: absolute; 
 
\t text-align: center; 
 
\t top: 9px; 
 
\t left: -15px; 
 
\t width: 65px; 
 
\t height: 41px; 
 
\t -webkit-transform: rotate(90deg); 
 
\t /* transform: rotate(90deg); */ 
 
\t -webkit-appearance: none; 
 
\t appearance: none; 
 
} 
 

 
#toggle-all input:before { 
 
\t content: '»'; 
 
\t font-size: 28px; 
 
\t color: #d9d9d9; 
 
\t padding: 0 25px 7px; 
 
} 
 

 
#toggle-all input:checked:before { 
 
\t color: #737373; 
 
} 
 

 
#new-todo { 
 
\t padding: 15px 15px 16px 60px; 
 
\t border: none; 
 
\t background: rgba(0, 0, 0, 0.02); 
 
\t z-index: 2; 
 
\t box-shadow: none; 
 
} 
 

 
#todo-list { 
 
\t margin: 0; 
 
\t padding: 0; 
 
\t list-style: none; 
 
} 
 

 
.checkbox-align { 
 
    padding-top: 7px; 
 
    margin-bottom: 0; 
 
    vertical-align: middle; 
 
} 
 

 
#todo-list li { 
 
\t position: relative; 
 
\t font-size: 24px; 
 
\t border-top: 1px dotted #ccc; 
 
} 
 

 
#todo-list input[type='checkbox'] { 
 
\t text-align: center; 
 
\t width: 40px; 
 
\t /* auto, since non-WebKit browsers doesn't support input styling */ 
 
\t height: auto; 
 
\t /* 
 
\t position: absolute; 
 
\t top: 0; 
 
\t bottom: 0; 
 
\t */ 
 
\t margin: auto 0; 
 
\t -webkit-appearance: none; 
 
\t /*-moz-appearance: none;*/ 
 
\t -ms-appearance: none; 
 
\t -o-appearance: none; 
 
\t appearance: none; 
 
} 
 

 
#todo-list input[type='checkbox']:after { 
 
\t content: '✔'; 
 
\t line-height: 62px; 
 
\t font-size: 20px; 
 
\t color: #d9d9d9; 
 
\t text-shadow: 0 -1px 0 #bfbfbf; 
 
} 
 

 
#todo-list input[type='checkbox']:checked:after { 
 
\t color: #85ada7; 
 
\t text-shadow: 0 1px 0 #669991; 
 
\t bottom: 1px; 
 
\t position: relative; 
 
} 
 

 
#todo-list input:not([type='checkbox']) { 
 
\t word-break: break-word; 
 
\t padding: 15px; 
 
\t margin-left: 45px; 
 
\t display: block; 
 
\t line-height: 1.2em; 
 
\t -webkit-transition: color 0.4s; 
 
\t -moz-transition: color 0.4s; 
 
\t -ms-transition: color 0.4s; 
 
\t -o-transition: color 0.4s; 
 
\t transition: color 0.4s; 
 
} 
 

 
#todo-list li .destroy { 
 
\t outline: none; 
 
\t background-color: transparent; 
 
\t display: none; 
 
\t position: absolute; 
 
\t top: 0; 
 
\t right: 10px; 
 
\t bottom: 0; 
 
\t width: 40px; 
 
\t height: 40px; 
 
\t margin: auto 0; 
 
\t font-size: 22px; 
 
\t color: #a88a8a; 
 
\t -webkit-transition: all 0.2s; 
 
\t -moz-transition: all 0.2s; 
 
\t -ms-transition: all 0.2s; 
 
\t -o-transition: all 0.2s; 
 
\t transition: all 0.2s; 
 
} 
 

 
#todo-list li .destroy:hover { 
 
\t text-shadow: 0 0 1px #000, 
 
\t \t \t \t 0 0 10px rgba(199, 107, 107, 0.8); 
 
\t -webkit-transform: scale(1.3); 
 
\t -moz-transform: scale(1.3); 
 
\t -ms-transform: scale(1.3); 
 
\t -o-transform: scale(1.3); 
 
\t transform: scale(1.3); 
 
} 
 

 
#todo-list li .destroy:after { 
 
\t content: '✖'; 
 
} 
 

 
#todo-list li:hover .destroy { 
 
\t display: block; 
 
} 
 

 
#todo-list .sapUiRrNoData, 
 
#todo-list .sapUiRrPtb, 
 
#todo-list .sapUiRrFtr { 
 
\t display: none; 
 
} 
 

 
#footer { 
 
\t color: #777; 
 
\t padding: 0 15px; 
 
\t position: absolute; 
 
\t right: 0; 
 
\t bottom: -31px; 
 
\t left: 0; 
 
\t height: 20px; 
 
\t z-index: -1; 
 
\t text-align: center; 
 
} 
 

 
#footer:before { 
 
\t content: ''; 
 
\t position: absolute; 
 
\t right: 0; 
 
\t bottom: 31px; 
 
\t left: 0; 
 
\t height: 50px; 
 
\t z-index: -1; 
 
\t box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 
 
\t \t \t \t 0 6px 0 -3px rgba(255, 255, 255, 0.8), 
 
\t \t \t \t 0 7px 1px -3px rgba(0, 0, 0, 0.3), 
 
\t \t \t \t 0 43px 0 -6px rgba(255, 255, 255, 0.8), 
 
\t \t \t \t 0 44px 2px -6px rgba(0, 0, 0, 0.2); 
 
} 
 

 
#footer #AllTodos, #footer #ActiveTodos, #footer #CompletedTodos { 
 
\t color: #83756f; 
 
} 
 

 
#footer #clear-completed { 
 
\t color: inherit; 
 
} 
 

 
#footer .sapUiHLayoutChildWrapper:nth-of-type(1) { 
 
\t float: left; 
 
\t text-align: left; 
 
} 
 

 
#todo-count { 
 
\t vertical-align: 1px; 
 
} 
 

 
#todo-count:first-letter { 
 
\t font-weight: bold; 
 
} 
 

 
#filters { 
 
\t margin: 0; 
 
\t padding: 0 2px 0 0; 
 
\t position: absolute; 
 
\t right: 0; 
 
\t left: 0; 
 
\t outline: none; 
 
} 
 

 
#filters .sapUiBtnStd, 
 
#filters .sapUiBtnFoc { 
 
\t background-color: transparent; 
 
\t font-weight: normal; 
 
\t outline: none; 
 
\t padding-right: 3px; 
 
\t margin-top: -1px; 
 
} 
 

 
#filters .sapUiSegButtonSelected.sapUiBtnStd, 
 
#filters .sapUiSegButtonSelected.sapUiBtnAct.sapUiBtnFoc { 
 
\t font-weight: bold; 
 
} 
 

 
#footer .sapUiHLayoutChildWrapper:nth-of-type(3) { 
 
\t float: right; 
 
} 
 

 
#clear-completed { 
 
\t float: right; 
 
\t position: relative; 
 
\t line-height: 20px; 
 
\t text-decoration: none; 
 
\t background: rgba(0, 0, 0, 0.1); 
 
\t font-size: 11px; 
 
\t padding: 0 10px; 
 
\t border-radius: 3px; 
 
\t box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.2); 
 
\t height: 20px; 
 
\t outline: none; 
 
} 
 

 
@-moz-document url-prefix() { 
 
\t #clear-completed { 
 
\t \t top: -22px; 
 
\t } 
 
} 
 

 
#clear-completed:hover { 
 
\t background: rgba(0, 0, 0, 0.15); 
 
\t box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.3); 
 
} 
 

 
#info { 
 
\t margin: 65px auto 0; 
 
\t color: #a6a6a6; 
 
\t font-size: 12px; 
 
\t text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); 
 
\t text-align: center; 
 
} 
 

 
#info a { 
 
\t color: inherit; 
 
} 
 

 
.hidden{ 
 
\t display:none; 
 
} 
 

 
hr { 
 
\t margin: 20px 0; 
 
\t border: 0; 
 
\t border-top: 1px dashed #C5C5C5; 
 
\t border-bottom: 1px dashed #F7F7F7; 
 
} 
 

 
.learn a { 
 
\t font-weight: normal; 
 
\t text-decoration: none; 
 
\t color: #b83f45; 
 
} 
 

 
.learn a:hover { 
 
\t text-decoration: underline; 
 
\t color: #787e7e; 
 
} 
 

 
.learn h3, 
 
.learn h4, 
 
.learn h5 { 
 
\t margin: 10px 0; 
 
\t font-weight: 500; 
 
\t line-height: 1.2; 
 
\t color: #000; 
 
} 
 

 
.learn h3 { 
 
\t font-size: 24px; 
 
} 
 

 
.learn h4 { 
 
\t font-size: 18px; 
 
} 
 

 
.learn h5 { 
 
\t margin-bottom: 0; 
 
\t font-size: 14px; 
 
} 
 

 
.learn ul { 
 
\t padding: 0; 
 
\t margin: 0 0 30px 25px; 
 
} 
 

 
.learn li { 
 
\t line-height: 20px; 
 
} 
 

 
.learn p { 
 
\t font-size: 15px; 
 
\t font-weight: 300; 
 
\t line-height: 1.3; 
 
\t margin-top: 0; 
 
\t margin-bottom: 0; 
 
} 
 

 
.quote { 
 
\t border: none; 
 
\t margin: 20px 0 60px 0; 
 
} 
 

 
.quote p { 
 
\t font-style: italic; 
 
} 
 

 
.quote p:before { 
 
\t content: '“'; 
 
\t font-size: 50px; 
 
\t opacity: .15; 
 
\t position: absolute; 
 
\t top: -20px; 
 
\t left: 3px; 
 
} 
 

 
.quote p:after { 
 
\t content: '”'; 
 
\t font-size: 50px; 
 
\t opacity: .15; 
 
\t position: absolute; 
 
\t bottom: -42px; 
 
\t right: 3px; 
 
} 
 

 
.quote footer { 
 
\t position: absolute; 
 
\t bottom: -40px; 
 
\t right: 0; 
 
} 
 

 
.quote footer img { 
 
\t border-radius: 3px; 
 
} 
 

 
.quote footer a { 
 
\t margin-left: 5px; 
 
\t vertical-align: middle; 
 
} 
 

 
.speech-bubble { 
 
\t position: relative; 
 
\t padding: 10px; 
 
\t background: rgba(0, 0, 0, .04); 
 
\t border-radius: 5px; 
 
} 
 

 
.speech-bubble:after { 
 
\t content: ''; 
 
\t position: absolute; 
 
\t top: 100%; 
 
\t right: 30px; 
 
\t border: 13px solid transparent; 
 
\t border-top-color: rgba(0, 0, 0, .04); 
 
} 
 

 
/**body*/.learn-bar > .learn { 
 
\t position: absolute; 
 
\t width: 272px; 
 
\t top: 8px; 
 
\t left: -300px; 
 
\t padding: 10px; 
 
\t border-radius: 5px; 
 
\t background-color: rgba(255, 255, 255, .6); 
 
\t transition-property: left; 
 
\t transition-duration: 500ms; 
 
} 
 

 
@media (min-width: 899px) { 
 
\t /**body*/.learn-bar { 
 
\t \t width: auto; 
 
\t \t margin: 0 0 0 300px; 
 
\t } 
 
\t /**body*/.learn-bar > .learn { 
 
\t \t left: 8px; 
 
\t } 
 
\t /**body*/.learn-bar #todoapp { 
 
\t \t width: 550px; 
 
\t \t margin: 130px auto 40px auto; 
 
\t } 
 
}
<!DOCTYPE html> 
 
<html> 
 
<head> 
 
\t <meta charset="UTF-8"/> 
 
\t <title>MyTodoList</title> 
 
\t <link rel="stylesheet" href="style.css"> 
 

 
\t <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ 
 
\t libs/angularjs/1.3.5/angular.min.js"></script> 
 

 
</head> 
 
<body ng-app="myapp"> 
 
\t <section id = "todoapp" ng-controller="TodoCtrl"> 
 
\t \t <header id="header"> 
 
\t \t \t <h1>MyTodoList</h1> 
 
\t \t \t <form action="#" id="todo-form"> 
 
\t \t \t \t <input type="text" id="new-todo" placeholder="New task" autofocus autocomplete="off" ng-model="remain"> 
 
\t \t \t </form> 
 
\t \t </header> 
 

 
\t 
 
\t \t <section id = "main"> 
 
\t \t \t <u1 id = "todo-list"> 
 
\t \t \t \t <li> 
 
\t \t \t \t \t <div class="view"> 
 
\t \t \t \t \t \t <input type="checkbox" class="toggle"> 
 
\t \t \t \t \t \t <label>Etendre le linge</label> 
 
\t \t \t \t \t \t <button class="destroy"></button> 
 
\t \t \t \t \t </div> 
 
\t \t \t \t </li> 
 
\t \t \t </u1> 
 

 
\t \t </section> 
 
\t \t <footer id="footer"> 
 
\t \t \t <span id="todo-count"><strong> {{ remain }} </strong> Tasks remaining 
 
\t \t \t </span> 
 
\t \t </footer> 
 

 

 
\t </section> 
 

 
\t <script src="MyTodoList.js"></script> 
 
\t <script src="app.js"></script> 
 

 
</body> 
 
</html>

答えて

0

に動作しませんなぜ私はそれがエラーを与えるような問題は、あなたのCDNにあるかわかりません。以下のanglejs cdnを使用してください。あなたの問題を解決します。

https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.min.js 

はこのためにplunkrデモを参照してください:

https://plnkr.co/edit/S6RYmyJE1BPIRpXtldRg?p=preview

関連する問題