Description
Enhancement
As a user, when i use “radios-inline” to crontrol some text input to hidden,so i use "condition" in these text input, exp: condition: "model.absolute"
Expected behaviour
I expected it worked for ie, firefix, chrome
Actual behaviour
It actually worked for firefix, chrome, but it raise exception in IE8, it shows:
TypeError: Object not supported “getAttribute" attribute or method
Debug:
condition: function(args) {
174 // Do we have a condition? Then we slap on an ng-if on all children,
175 // but be nice to existing ng-if.
176 console.log(args);
177 if (args.form.condition) {
178 var evalExpr = 'evalExpr(' + args.path +
179 '.condition, { model: model, "arrayIndex": $index})';
180 if (args.form.key) {
181 var strKey = sfPathProvider.stringify(args.form.key);
182 evalExpr = 'evalExpr(' + args.path + '.condition,{ model: model, "arrayIndex": $index, ' +
183 '"modelValue": model' + (strKey[0] === '[' ? '' : '.') + strKey + '})';
184 }
185
186 var children = args.fieldFrag.children || args.fieldFrag.childNodes;
187 console.log(children);
188 for (var i = 0; i < children.length; i++) {
189 var child = children[i];
190 console.log(child);
191 var ngIf = child.getAttribute('ng-if');
192 child.setAttribute(
193 'ng-if',
194 ngIf ?
195 '(' + ngIf +
196 ') || (' + evalExpr + ')'
197 : evalExpr
198 );
199 }
200 }
201 },
In the ie console, it shows:
<NodeList length="2"></NodeList>
<p class="hz-help (
EmptyTextNode
TypeError: Object not supported “getAttribute" attribute or method