Skip to content

Instantly share code, notes, and snippets.

@lalabear
lalabear / gist:3315650
Created August 10, 2012 17:02 — forked from anonymous/gist:3311403
如何使用迅雷抓美劇
@lalabear
lalabear / scenarios.js
Created August 8, 2012 14:02
邊學AngularJS邊做Todo List (6) -E2E測試
'use strict';
describe('Todo List', function() {
beforeEach(function() {
browser().navigateTo('../../public/todoWithUpdate.html');
});
it('should display "Todo List" when page loaded', function() {
@lalabear
lalabear / controllers.js
Created July 21, 2012 01:52
邊學AngularJS邊做Todo List第四回
function TodoCrtl($scope) {
$scope.newItem = '';
$scope.todoList = [];
$scope.addItem = function(){
if(this.newItem){
this.todoList.push({label:this.newItem});
this.newItem = '';
}
}
@lalabear
lalabear / controllers.js
Created July 19, 2012 14:56
邊學AngularJS邊做Todo List第三回
function TodoCrtl($scope) {
$scope.newItem = '';
$scope.todoList = [];
$scope.addItem = function(){
if(this.newItem){
this.todoList.push({label:this.newItem});
this.newItem = '';
}
}
}
@lalabear
lalabear / helloWorld.html
Created July 17, 2012 08:45
邊學AngularJS邊做Todo List 第一回 HelloWorld
<!DOCTYPE html>
<html ng-app>
<head>
<title>邊學AngularJS邊做Todo List (1)</title>
<script type="text/javascript" src="http://code.angularjs.org/angular-1.0.1.min.js"></script>
</head>
<body>
<h1>Hello World</h1>
<p>AngularJs say hello to {{yourName || 'everyone'}}!</p>
<label>輸入你的姓名,Angular會跟你打招呼</label>
@lalabear
lalabear / controllers.js
Created July 17, 2012 08:41
邊學AngularJS邊做Todo List 第二回
function TodoCrtl($scope) {
$scope.newItem = '';
$scope.todoList = [];
$scope.addItem = function(){
if(this.newItem){
this.todoList.push({label:this.newItem});
this.newItem = '';
}
}
}