Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

angular #1

Merged
merged 2 commits into from

2 participants

David Mosher test double
David Mosher
Collaborator

No description provided.

test double testdouble merged commit 028d832 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 13, 2012
  1. David Mosher

    added angular.js

    davemo authored
  2. David Mosher

    make stuff better! :heart:

    davemo authored
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 19 deletions.
  1. +2 −1  README.md
  2. +15 −17 index.html
  3. +5 −1 spec/todos-spec.js
3  README.md
View
@@ -16,6 +16,7 @@ other forks of the repo.
* [ember.js](http://emberjs.com/)
* [batman.js](http://batmanjs.org/)
* [spine.js](http://spinejs.com/)
+ * [angular.js](http://angularjs.org/#/)
* [JavaScriptMVC](http://javascriptmvc.com/)
2. Load the JavaScripts you'll need in `index.html`
@@ -26,7 +27,7 @@ other forks of the repo.
get at the default HTML template for the main application view, you might do this with jQuery:
``` javascript
- $('#app-template').html();
+ $('#item-template').html();
```
From that point, most JavaScript app frameworks have a facility or convention for applying client-side templates.
32 index.html
View
@@ -19,27 +19,25 @@
</head>
<body>
- <script type="text/template" id="app-template">
- <div id="todoapp">
- <div class="title">
- <h1>Todos</h1>
+ <div id="todoapp">
+ <div class="title">
+ <h1>Todos</h1>
+ </div>
+ <div class="content">
+ <div id="create-todo">
+ <input id="new-todo" placeholder="What needs to be done?" type="text" />
+ <span class="ui-tooltip-top" style="display:none;">Press Enter to save this task</span>
</div>
- <div class="content">
- <div id="create-todo">
- <input id="new-todo" placeholder="What needs to be done?" type="text" />
- <span class="ui-tooltip-top" style="display:none;">Press Enter to save this task</span>
- </div>
- <div id="todos">
- <ul id="todo-list"></ul>
- </div>
- <div id="todo-stats"></div>
+ <div id="todos">
+ <ul id="todo-list"></ul>
</div>
+ <div id="todo-stats"></div>
</div>
+ </div>
- <ul id="instructions">
- <li>Double-click to edit a todo.</li>
- </ul>
- </script>
+ <ul id="instructions">
+ <li>Double-click to edit a todo.</li>
+ </ul>
<script type="text/template" id="item-template">
6 spec/todos-spec.js
View
@@ -17,7 +17,7 @@ window.todoAppDriver = {
};
$(function() {
- describe("A humble to-do application", function() {
+ describe("A humble to-do application", function() {
describe("adding a todo", function() {
var TODO_TEXT = "hug Matt Yoho";
beforeEach(function() {
@@ -70,6 +70,10 @@ $(function() {
}
});
});
+
+ afterEach(function(){
+ $('#new-todo').val('')
+ });
});
Something went wrong with that request. Please try again.