mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fixed the way IE breaks parests on innerHTML
This commit is contained in:
parent
5fdb117b32
commit
0396054b4a
3 changed files with 9 additions and 6 deletions
|
|
@ -211,11 +211,9 @@ JQLite.prototype = {
|
|||
|
||||
html: function(value) {
|
||||
if (isDefined(value)) {
|
||||
var parent = this[0], child;
|
||||
while(parent.childNodes.length) {
|
||||
child = parent.childNodes[0];
|
||||
jqLite(child).dealoc();
|
||||
parent.removeChild(child);
|
||||
var i = 0, childNodes = this[0].childNodes;
|
||||
for ( ; i < childNodes.length; i++) {
|
||||
jqLite(childNodes[i]).dealoc();
|
||||
}
|
||||
this[0].innerHTML = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,6 +239,11 @@ var ngSwitch = angularWidget('NG:SWITCH', function (element){
|
|||
}
|
||||
});
|
||||
|
||||
// this needs to be here for IE
|
||||
foreach(cases, function(_case){
|
||||
_case.element.remove();
|
||||
});
|
||||
|
||||
element.html('');
|
||||
return function(element){
|
||||
var scope = this, childScope;
|
||||
|
|
|
|||
2
test.sh
2
test.sh
|
|
@ -1,2 +1,2 @@
|
|||
# java -jar lib/jstestdriver/JsTestDriver.jar --tests all
|
||||
java -jar lib/jstestdriver/JsTestDriver.jar --tests all --config jsTestDriver-jquery.conf
|
||||
java -jar lib/jstestdriver/JsTestDriver.jar --tests 'widget ng:switch' --config jsTestDriver-jquery.conf
|
||||
|
|
|
|||
Loading…
Reference in a new issue