diff options
| author | Misko Hevery | 2011-02-12 10:13:28 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-16 01:03:12 -0500 |
| commit | ef4bb28be13e99f96c9ace5936cf26a174a0e5f0 (patch) | |
| tree | 833057505e430cac064214ac3d55c687338da2a9 /src/widgets.js | |
| parent | 496e6bf9016d33a7cf2f4730d06a8655f01ca5cb (diff) | |
| download | angular.js-ef4bb28be13e99f96c9ace5936cf26a174a0e5f0.tar.bz2 | |
Change API angular.compile(element)([scope], [element/true])
Diffstat (limited to 'src/widgets.js')
| -rw-r--r-- | src/widgets.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets.js b/src/widgets.js index 58c22081..14d6fe10 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -676,7 +676,7 @@ angularWidget('ng:include', function(element){ xhr('GET', src, function(code, response){ element.html(response); childScope = useScope || createScope(scope); - compiler.compile(element)(element, childScope); + compiler.compile(element)(childScope); scope.$eval(onloadExp); }); } else { @@ -793,7 +793,7 @@ var ngSwitch = angularWidget('ng:switch', function (element){ var caseElement = switchCase.element.cloneNode(); element.append(caseElement); childScope.$tryEval(switchCase.change, element); - switchCase.template(caseElement, childScope); + switchCase.template(childScope, caseElement); } }); }); @@ -945,7 +945,7 @@ angularWidget("@ng:repeat", function(expression, element){ (index == collectionLength - 1 ? 'last' : 'middle'); lastElement.after(cloneElement = element.cloneNode()); cloneElement.attr('ng:repeat-index', index); - linker(cloneElement, childScope); + linker(childScope, cloneElement); children.push(childScope); } childScope.$eval(); @@ -1067,7 +1067,7 @@ angularWidget('ng:view', function(element) { if (src) { $xhr('GET', src, function(code, response){ element.html(response); - compiler.compile(element)(element, childScope); + compiler.compile(element)(childScope); }); } else { element.html(''); |
