日食的AngularJS插件不起作用

时间:2015-01-20 14:02:23

标签: eclipse angularjs node.js angularjs-directive eclipse-plugin

我遇到了eclipse和AngularJS的问题。我在本教程中做了所有的事情: 1. http://blog.diniscruz.com/2014/02/using-angularjs-in-eclipse-part-1.html 2. https://github.com/angelozerr/angularjs-eclipse/wiki/Getting-Started#troubleshooting 3. http://javahonk.com/install-angularjs-plugin-eclipse/ 但有了这一切,我有同样的问题...... 我的代码看起来像这样 的index.html

<!DOCTYPE html>
<html ng-app="sample">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<script src="todo.js"></script>
</head>
<body>
<h2>Todo</h2>
<div ng-controller='TodoCtrl'>
<span>{{remaining()}} of {{todos.lenght}} remaining</span>
 [ <a href="" ng-click="archive()">archive</a>]
 <ul class="unstyled">
 <li ng-repeat="todo in todos">
 <input type="checkbox" ng-model="todo.done">
 <span class="done-{{todo.done}}">{{todo.text}}</span>
 </li>
 </ul>
 <form ng-submit="addTodo()"></form>
</div>

</body>
</html>

todo.js

angular.module('sample', []).controller('TodoCtrl', function TodoCtrl($scope){
    $scope.todos=[
                  {text: 'learn angular', done:true},
                  {text: 'build an angular app', done:true}];
    $scope.addTodo= function(){
        $scope.todos.push({text: $scope.todoText, done:false});
        $scope.todoText='';
    }
});

todo.css

done-true{
        text-decoration: line-through;
        color: grey;
}

我的环境:     - Eclipse kepler EE     - 安装Angular 0.8.0插件(尝试0.5.0和0.7.0同样的问题)     - 安装JSDT     - 在eclipse中安装nodeJS和设置路径到nodejs.exe文件     - 脚本路径设置良好     - 已安装的tern插件

我在eclipse浏览器中测试过,chrom和mozilla ...... 请有人解决这个问题的解决方案:(

这是我的输出和代码

Output

enter image description here

之前必须有&#34;剩下的&#34;然后是一些文字......

<span>{{remaining()}} of {{todos.lenght}} remaining</span>

0 个答案:

没有答案