-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/angelozerr/angularjs-eclipse/issues/70
- Loading branch information
1 parent
1671f19
commit f8983a8
Showing
12 changed files
with
103 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>todos-controllerAs</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>tern.eclipse.ide.core.ternBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>tern.eclipse.ide.core.ternnature</nature> | ||
<nature>org.eclipse.angularjs.core.angularnature</nature> | ||
</natures> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
samples/todos-controllerAs/.settings/tern.eclipse.ide.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
traceOnConsole=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"plugins":{"angular":{}},"libs":["browser","ecma5"],"ide":{}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!doctype html> | ||
<html ng-app> | ||
<head> | ||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script> | ||
<script src="todo.js"></script> | ||
<link rel="stylesheet" href="todo.css"> | ||
</head> | ||
<body> | ||
<h2>Todo</h2> | ||
<div ng-controller="TodoCtrl"> | ||
<span>{{remaining()}} of {{todos.length}} 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()"> | ||
<input type="text" ng-model="todoText" size="30" | ||
placeholder="add new todo here"> | ||
<input class="btn-primary" type="submit" value="add"> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.done-true { | ||
text-decoration: line-through; | ||
color: grey; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function TodoCtrl($scope) { | ||
$scope.todos = [ | ||
{text:'learn angular', done:true}, | ||
{text:'build an angular app', done:false}]; | ||
|
||
$scope.addTodo = function() { | ||
$scope.todos.push({text:$scope.todoText, done:false}); | ||
$scope.todoText = ''; | ||
}; | ||
|
||
$scope.remaining = function() { | ||
var count = 0; | ||
angular.forEach($scope.todos, function(todo) { | ||
count += todo.done ? 0 : 1; | ||
}); | ||
return count; | ||
}; | ||
|
||
$scope.archive = function() { | ||
var oldTodos = $scope.todos; | ||
$scope.todos = []; | ||
angular.forEach(oldTodos, function(todo) { | ||
if (!todo.done) $scope.todos.push(todo); | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
traceOnConsole=true |