@@ -1332,6 +1332,27 @@ describe('ngRepeat and transcludes', function() {
1332
1332
dealoc ( element ) ;
1333
1333
} ) ;
1334
1334
} ) ;
1335
+
1336
+
1337
+ it ( 'should work with svg elements when the svg container is transcluded' , function ( ) {
1338
+ module ( function ( $compileProvider ) {
1339
+ $compileProvider . directive ( 'svgContainer' , function ( ) {
1340
+ return {
1341
+ template : '<svg ng-transclude></svg>' ,
1342
+ replace : true ,
1343
+ transclude : true
1344
+ } ;
1345
+ } ) ;
1346
+ } ) ;
1347
+ inject ( function ( $compile , $rootScope ) {
1348
+ element = $compile ( '<svg-container><circle ng-repeat="r in rows"></circle></svg-container>' ) ( $rootScope ) ;
1349
+ $rootScope . rows = [ 1 ] ;
1350
+ $rootScope . $apply ( ) ;
1351
+
1352
+ var circle = element . find ( 'circle' ) ;
1353
+ expect ( circle [ 0 ] . toString ( ) ) . toMatch ( / S V G / ) ;
1354
+ } ) ;
1355
+ } ) ;
1335
1356
} ) ;
1336
1357
1337
1358
describe ( 'ngRepeat animations' , function ( ) {
@@ -1464,25 +1485,4 @@ describe('ngRepeat animations', function() {
1464
1485
expect ( item . element . text ( ) ) . toBe ( '3' ) ;
1465
1486
} )
1466
1487
) ;
1467
-
1468
- it ( 'should work with svg elements when the svg container is transcluded' , function ( ) {
1469
- module ( function ( $compileProvider ) {
1470
- $compileProvider . directive ( 'svgContainer' , function ( ) {
1471
- return {
1472
- template : '<svg ng-transclude></svg>' ,
1473
- replace : true ,
1474
- transclude : true
1475
- } ;
1476
- } ) ;
1477
- } ) ;
1478
- inject ( function ( $compile , $rootScope ) {
1479
- element = $compile ( '<svg-container><circle ng-repeat="r in rows"></circle></svg-container>' ) ( $rootScope ) ;
1480
- $rootScope . rows = [ 1 ] ;
1481
- $rootScope . $apply ( ) ;
1482
-
1483
- var circle = element . find ( 'circle' ) ;
1484
- expect ( circle [ 0 ] . toString ( ) ) . toMatch ( / S V G / ) ;
1485
- } ) ;
1486
- } ) ;
1487
-
1488
1488
} ) ;
0 commit comments