aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorMisko Hevery2010-03-18 14:43:49 -0700
committerMisko Hevery2010-03-18 14:43:49 -0700
commitdf607da0d1b9726bce6584238fe3ad7e9b65a966 (patch)
tree472a81182226bde4c3541592f940983c9486eea2 /src/directives.js
parent7634a3ed5227f8bc2a2ba83752d0e2c78adb6051 (diff)
downloadangular.js-df607da0d1b9726bce6584238fe3ad7e9b65a966.tar.bz2
support for templates
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/directives.js b/src/directives.js
index 7c5cc257..26cbfe2c 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -58,12 +58,12 @@ angular.directive("bind-attr", function(expression, element){
angular.directive("repeat", function(expression, element){
var anchor = document.createComment(expression);
jQuery(element).replace(anchor);
- var template = this.templetize(element);
+ var template = this.compile(element);
var lhs = "item";
var rhs = "items";
- var children = [];
return function(){
- this.$watch(rhs, function(items){
+ var children = [];
+ this.$eval(rhs, function(items){
foreach(children, function(child){
child.element.remove();
});
@@ -102,7 +102,7 @@ angular.directive("action", function(expression, element){
//ng-eval
angular.directive("eval", function(expression, element){
return function(){
- this.$onUpdate( expression);
+ this.$eval(expression);
};
});
//ng-watch