5
5
getOrSetCacheData ,
6
6
isTextNode ,
7
7
startingTag ,
8
- } from "../../shared/jqlite/jqlite" ;
9
- import { identifierForController } from "../controller/controller" ;
10
- import { TTL } from "../scope/scope" ;
8
+ } from "../../shared/jqlite/jqlite.js " ;
9
+ import { identifierForController } from "../controller/controller.js " ;
10
+ import { TTL } from "../scope/scope.js " ;
11
11
import {
12
12
minErr ,
13
13
assertArg ,
@@ -31,13 +31,13 @@ import {
31
31
simpleCompare ,
32
32
isError ,
33
33
directiveNormalize ,
34
- } from "../../shared/utils" ;
35
- import { SCE_CONTEXTS } from "../sce/sce" ;
36
- import { PREFIX_REGEXP } from "../../shared/constants" ;
37
- import { createEventDirective } from "../../directive/events/events" ;
38
- import { CACHE , EXPANDO } from "../cache/cache" ;
39
- import { Attributes } from "./attributes" ;
40
- import { ngObserveDirective } from "../../directive/observe/observe" ;
34
+ } from "../../shared/utils.js " ;
35
+ import { SCE_CONTEXTS } from "../sce/sce.js " ;
36
+ import { PREFIX_REGEXP } from "../../shared/constants.js " ;
37
+ import { createEventDirective } from "../../directive/events/events.js " ;
38
+ import { CACHE , EXPANDO } from "../cache/cache.js " ;
39
+ import { Attributes } from "./attributes.js " ;
40
+ import { ngObserveDirective } from "../../directive/observe/observe.js " ;
41
41
42
42
let ttl = TTL ;
43
43
@@ -588,7 +588,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
588
588
: ( x ) => x . replace ( / \{ \{ / g, startSymbol ) . replace ( / } } / g, endSymbol ) ;
589
589
590
590
const NG_PREFIX_BINDING = / ^ n g ( A t t r | P r o p | O n | O b s e r v e ) ( [ A - Z ] .* ) $ / ;
591
- const MULTI_ELEMENT_DIR_RE = / ^ ( .+ ) S t a r t $ / ;
592
591
return compile ;
593
592
594
593
//= ===============================
@@ -994,7 +993,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
994
993
let isNgProp = false ;
995
994
let isNgEvent = false ;
996
995
let isNgObserve = false ;
997
- let multiElementMatch ;
998
996
999
997
attr = nAttrs [ j ] ;
1000
998
name = attr . name ;
@@ -1015,15 +1013,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1015
1013
. toLowerCase ( )
1016
1014
. substring ( 4 + ngPrefixMatch [ 1 ] . length )
1017
1015
. replace ( / _ ( .) / g, ( match , letter ) => letter . toUpperCase ( ) ) ;
1018
-
1019
- // Support *-start / *-end multi element directives
1020
- } else if (
1021
- ( multiElementMatch = nName . match ( MULTI_ELEMENT_DIR_RE ) ) &&
1022
- directiveIsMultiElement ( multiElementMatch [ 1 ] )
1023
- ) {
1024
- attrStartName = name ;
1025
- attrEndName = `${ name . substring ( 0 , name . length - 5 ) } end` ;
1026
- name = name . substring ( 0 , name . length - 6 ) ;
1027
1016
}
1028
1017
1029
1018
if ( isNgProp || isNgEvent ) {
@@ -2159,33 +2148,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2159
2148
return match ;
2160
2149
}
2161
2150
2162
- /**
2163
- * looks up the directive and returns true if it is a multi-element directive,
2164
- * and therefore requires DOM nodes between -start and -end markers to be grouped
2165
- * together. Example: `<div my-directive-start></div><div><div/><div my-directive-end></div>`
2166
- *
2167
- * @param {string } name name of the directive to look up.
2168
- * @returns true if directive was registered as multi-element.
2169
- */
2170
- function directiveIsMultiElement ( name ) {
2171
- if ( Object . prototype . hasOwnProperty . call ( hasDirectives , name ) ) {
2172
- for (
2173
- let directive ,
2174
- directives = $injector . get ( name + Suffix ) ,
2175
- i = 0 ,
2176
- ii = directives . length ;
2177
- i < ii ;
2178
- i ++
2179
- ) {
2180
- directive = directives [ i ] ;
2181
- if ( directive . multiElement ) {
2182
- return true ;
2183
- }
2184
- }
2185
- }
2186
- return false ;
2187
- }
2188
-
2189
2151
/**
2190
2152
* When the element is replaced with HTML template then the new attributes
2191
2153
* on the template need to be merged with the existing attributes in the DOM.
0 commit comments