@@ -1332,6 +1332,28 @@ 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
+ var 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
+ dealoc ( element ) ;
1355
+ } ) ;
1356
+ } ) ;
1335
1357
} ) ;
1336
1358
1337
1359
describe ( 'ngRepeat animations' , function ( ) {
@@ -1464,25 +1486,4 @@ describe('ngRepeat animations', function() {
1464
1486
expect ( item . element . text ( ) ) . toBe ( '3' ) ;
1465
1487
} )
1466
1488
) ;
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
1489
} ) ;
0 commit comments