@@ -1551,7 +1551,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15511551
15521552 var startSymbol = $interpolate . startSymbol ( ) ,
15531553 endSymbol = $interpolate . endSymbol ( ) ,
1554- denormalizeTemplate = ( startSymbol == '{{' && endSymbol == '}}' )
1554+ denormalizeTemplate = ( startSymbol === '{{' && endSymbol = == '}}' )
15551555 ? identity
15561556 : function denormalizeTemplate ( template ) {
15571557 return template . replace ( / \{ \{ / g, startSymbol ) . replace ( / } } / g, endSymbol ) ;
@@ -1946,7 +1946,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
19461946 "Unterminated attribute, found '{0}' but no matching '{1}' found." ,
19471947 attrStart , attrEnd ) ;
19481948 }
1949- if ( node . nodeType == NODE_TYPE_ELEMENT ) {
1949+ if ( node . nodeType === NODE_TYPE_ELEMENT ) {
19501950 if ( node . hasAttribute ( attrStart ) ) depth ++ ;
19511951 if ( node . hasAttribute ( attrEnd ) ) depth -- ;
19521952 }
@@ -2132,7 +2132,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
21322132 nonTlbTranscludeDirective = directive ;
21332133 }
21342134
2135- if ( directiveValue == 'element' ) {
2135+ if ( directiveValue === 'element' ) {
21362136 hasElementTranscludeDirective = true ;
21372137 terminalPriority = directive . priority ;
21382138 $template = $compileNode ;
@@ -2250,7 +2250,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
22502250 }
22512251 compileNode = $template [ 0 ] ;
22522252
2253- if ( $template . length != 1 || compileNode . nodeType !== NODE_TYPE_ELEMENT ) {
2253+ if ( $template . length !== 1 || compileNode . nodeType !== NODE_TYPE_ELEMENT ) {
22542254 throw $compileMinErr ( 'tplrt' ,
22552255 "Template for directive '{0}' must have exactly one root element. {1}" ,
22562256 directiveName , '' ) ;
@@ -2635,7 +2635,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
26352635 try {
26362636 directive = directives [ i ] ;
26372637 if ( ( isUndefined ( maxPriority ) || maxPriority > directive . priority ) &&
2638- directive . restrict . indexOf ( location ) != - 1 ) {
2638+ directive . restrict . indexOf ( location ) !== - 1 ) {
26392639 if ( startAttrName ) {
26402640 directive = inherit ( directive , { $$start : startAttrName , $$end : endAttrName } ) ;
26412641 }
@@ -2692,7 +2692,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
26922692
26932693 // reapply the old attributes to the new element
26942694 forEach ( dst , function ( value , key ) {
2695- if ( key . charAt ( 0 ) != '$' ) {
2695+ if ( key . charAt ( 0 ) !== '$' ) {
26962696 if ( src [ key ] && src [ key ] !== value ) {
26972697 value += ( key === 'style' ? ';' : ' ' ) + src [ key ] ;
26982698 }
@@ -2702,16 +2702,16 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
27022702
27032703 // copy the new attributes on the old attrs object
27042704 forEach ( src , function ( value , key ) {
2705- if ( key == 'class' ) {
2705+ if ( key === 'class' ) {
27062706 safeAddClass ( $element , value ) ;
27072707 dst [ 'class' ] = ( dst [ 'class' ] ? dst [ 'class' ] + ' ' : '' ) + value ;
2708- } else if ( key == 'style' ) {
2708+ } else if ( key === 'style' ) {
27092709 $element . attr ( 'style' , $element . attr ( 'style' ) + ';' + value ) ;
27102710 dst [ 'style' ] = ( dst [ 'style' ] ? dst [ 'style' ] + ';' : '' ) + value ;
27112711 // `dst` will never contain hasOwnProperty as DOM parser won't let it.
27122712 // You will get an "InvalidCharacterError: DOM Exception 5" error if you
27132713 // have an attribute like "has-own-property" or "data-has-own-property", etc.
2714- } else if ( key . charAt ( 0 ) != '$' && ! dst . hasOwnProperty ( key ) ) {
2714+ } else if ( key . charAt ( 0 ) !== '$' && ! dst . hasOwnProperty ( key ) ) {
27152715 dst [ key ] = value ;
27162716 dstAttr [ key ] = srcAttr [ key ] ;
27172717 }
@@ -2750,7 +2750,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
27502750 }
27512751 compileNode = $template [ 0 ] ;
27522752
2753- if ( $template . length != 1 || compileNode . nodeType !== NODE_TYPE_ELEMENT ) {
2753+ if ( $template . length !== 1 || compileNode . nodeType !== NODE_TYPE_ELEMENT ) {
27542754 throw $compileMinErr ( 'tplrt' ,
27552755 "Template for directive '{0}' must have exactly one root element. {1}" ,
27562756 origAsyncDirective . name , templateUrl ) ;
@@ -2778,7 +2778,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
27782778 childTranscludeFn , $compileNode , origAsyncDirective , preLinkFns , postLinkFns ,
27792779 previousCompileContext ) ;
27802780 forEach ( $rootElement , function ( node , i ) {
2781- if ( node == compileNode ) {
2781+ if ( node === compileNode ) {
27822782 $rootElement [ i ] = $compileNode [ 0 ] ;
27832783 }
27842784 } ) ;
@@ -2903,15 +2903,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
29032903
29042904
29052905 function getTrustedContext ( node , attrNormalizedName ) {
2906- if ( attrNormalizedName == "srcdoc" ) {
2906+ if ( attrNormalizedName === "srcdoc" ) {
29072907 return $sce . HTML ;
29082908 }
29092909 var tag = nodeName_ ( node ) ;
29102910 // maction[xlink:href] can source SVG. It's not limited to <maction>.
2911- if ( attrNormalizedName == "xlinkHref" ||
2912- ( tag == "form" && attrNormalizedName == "action" ) ||
2913- ( tag != "img" && ( attrNormalizedName == "src" ||
2914- attrNormalizedName == "ngSrc" ) ) ) {
2911+ if ( attrNormalizedName === "xlinkHref" ||
2912+ ( tag === "form" && attrNormalizedName = == "action" ) ||
2913+ ( tag !== "img" && ( attrNormalizedName = == "src" ||
2914+ attrNormalizedName === "ngSrc" ) ) ) {
29152915 return $sce . RESOURCE_URL ;
29162916 }
29172917 }
@@ -2974,7 +2974,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
29742974 //skip animations when the first digest occurs (when
29752975 //both the new and the old values are the same) since
29762976 //the CSS classes are the non-interpolated values
2977- if ( name === 'class' && newValue != oldValue ) {
2977+ if ( name === 'class' && newValue !== oldValue ) {
29782978 attr . $updateClass ( newValue , oldValue ) ;
29792979 } else {
29802980 attr . $set ( name , newValue ) ;
@@ -3005,7 +3005,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
30053005
30063006 if ( $rootElement ) {
30073007 for ( i = 0 , ii = $rootElement . length ; i < ii ; i ++ ) {
3008- if ( $rootElement [ i ] == firstElementToRemove ) {
3008+ if ( $rootElement [ i ] === firstElementToRemove ) {
30093009 $rootElement [ i ++ ] = newNode ;
30103010 for ( var j = i , j2 = j + removeCount - 1 ,
30113011 jj = $rootElement . length ;
@@ -3308,7 +3308,7 @@ function tokenDifference(str1, str2) {
33083308 for ( var i = 0 ; i < tokens1 . length ; i ++ ) {
33093309 var token = tokens1 [ i ] ;
33103310 for ( var j = 0 ; j < tokens2 . length ; j ++ ) {
3311- if ( token == tokens2 [ j ] ) continue outer;
3311+ if ( token === tokens2 [ j ] ) continue outer;
33123312 }
33133313 values += ( values . length > 0 ? ' ' : '' ) + token ;
33143314 }
0 commit comments