From 2a30a02f015dd54846bb62d1f05e82b3cf76ef9f Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Tue, 27 Jul 2010 15:54:50 -0700
Subject: fix preventDefault for events
---
example/temp.html | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'example/temp.html')
diff --git a/example/temp.html b/example/temp.html
index 337f7fba..f21d3f5c 100644
--- a/example/temp.html
+++ b/example/temp.html
@@ -1,10 +1,15 @@
+
- Hello {{'World'}}!
+
+ outter
+
inner
+
link
+
--
cgit v1.2.3
From 1b768b84439e725010acc943ebfda462e49d3704 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Thu, 29 Jul 2010 12:50:14 -0700
Subject: refactored $location service so that it correctly updates under all
conditions
---
example/temp.html | 86 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 78 insertions(+), 8 deletions(-)
(limited to 'example/temp.html')
diff --git a/example/temp.html b/example/temp.html
index f21d3f5c..b238c185 100644
--- a/example/temp.html
+++ b/example/temp.html
@@ -1,15 +1,85 @@
-
+
-
-
- outter
-
inner
-
link
-
+
+
+Tic-Tac-Toe
+Next Player: {{nextMove}}
+Player {{winner}} has won!
+
+
+
-
+
\ No newline at end of file
--
cgit v1.2.3
From 03aac8b0ab17a9e8a41c5794f1e838315875051a Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Thu, 29 Jul 2010 15:26:10 -0700
Subject: fix broken build, fix #autobind and css loading
---
example/temp.html | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
(limited to 'example/temp.html')
diff --git a/example/temp.html b/example/temp.html
index b238c185..b6752d57 100644
--- a/example/temp.html
+++ b/example/temp.html
@@ -2,7 +2,7 @@
+ src="../angular-debug.js" ng:autobind ng:css="css/angular.css">
@@ -17,10 +17,7 @@ function TicTacToeCntl(){
'cursor': 'pointer'
};
this.reset();
- this.$watch('$location.hashPath', this.setMemento);
- this.$onEval(function(){
- this.$location.hashPath = this.getMemento();
- });
+ this.$watch('$location.hashPath', this.readUrl);
}
TicTacToeCntl.prototype = {
dropPiece: function(row, col) {
@@ -28,6 +25,7 @@ TicTacToeCntl.prototype = {
this.board[row][col] = this.nextMove;
this.nextMove = this.nextMove == 'X' ? 'O' : 'X';
this.grade();
+ this.setUrl();
}
},
reset: function(){
@@ -38,6 +36,7 @@ TicTacToeCntl.prototype = {
];
this.nextMove = 'X';
this.winner = '';
+ this.setUrl();
},
grade: function(){
var b = this.board;
@@ -50,14 +49,14 @@ TicTacToeCntl.prototype = {
function diagonal(i) { return same(b[0][1-i], b[1][1], b[2][1+i]);}
function same(a, b, c) { return (a==b && b==c) ? a : '';};
},
- getMemento: function(){
+ setUrl: function(){
var rows = [];
angular.foreach(this.board, function(row){
rows.push(row.join(','));
});
- return rows.join(';') + '/' + this.nextMove;
+ this.$location.hashPath = rows.join(';') + '/' + this.nextMove;
},
- setMemento: function(value) {
+ readUrl: function(value) {
if (value) {
value = value.split('/');
this.nextMove = value[1];
--
cgit v1.2.3
From 89245f3a527415a80d46b37054b558454c314532 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Tue, 3 Aug 2010 16:53:27 -0700
Subject: added RequestHeaders to XHR
---
example/temp.html | 92 +++++++++++++------------------------------------------
1 file changed, 22 insertions(+), 70 deletions(-)
(limited to 'example/temp.html')
diff --git a/example/temp.html b/example/temp.html
index b6752d57..8a1246ed 100644
--- a/example/temp.html
+++ b/example/temp.html
@@ -7,78 +7,30 @@
-Tic-Tac-Toe
-Next Player: {{nextMove}}
-Player {{winner}} has won!
-
-
+
+
+
\ No newline at end of file
--
cgit v1.2.3