feature(DOM): Experiment w/ excluding 'ng-scope' and 'ng-isolate-scope' classnames from elements

Ultimate goal is to reduce DOM manipulations. It appears 'ng-scope' and
'ng-isolate-scope' classnames are not required for Angular to work. So
in an effort to reduce any DOM manipulations, we’re going to try to
excluding them from being added to elements and see what comes of it.
This commit is contained in:
Adam Bradley
2014-02-10 11:20:42 -06:00
parent e8605b58fe
commit 042ad8e271
2 changed files with 3 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
angular.element.prototype.addClass = function(cssClasses) {
var x, y, cssClass, el, splitClasses, existingClasses;
if (cssClasses) {
if (cssClasses && cssClasses != 'ng-scope' && cssClasses != 'ng-isolate-scope') {
for(x=0; x<this.length; x++) {
el = this[x];
if(el.setAttribute) {