@@ -1035,10 +1035,11 @@ describe('$compile', function() {
1035
1035
) ;
1036
1036
1037
1037
1038
- it ( 'should allow more then one scope creation per element' , inject (
1038
+ it ( 'should allow more one new scope directives per element, but directives should share' +
1039
+ 'the scope' , inject (
1039
1040
function ( $rootScope , $compile , log ) {
1040
- $compile ( '<div class="scope-a; scope-b"></div>' ) ( $rootScope ) ;
1041
- expect ( log ) . toEqual ( '001; 001 ' ) ;
1041
+ element = $compile ( '<div class="scope-a; scope-b"></div>' ) ( $rootScope ) ;
1042
+ expect ( log ) . toEqual ( '002; 002 ' ) ;
1042
1043
} )
1043
1044
) ;
1044
1045
@@ -1064,10 +1065,18 @@ describe('$compile', function() {
1064
1065
) ;
1065
1066
1066
1067
1067
- it ( 'should treat new scope on new template as noop ' , inject (
1068
+ it ( 'should create new scope even at the root of the template ' , inject (
1068
1069
function ( $rootScope , $compile , log ) {
1069
1070
element = $compile ( '<div scope-a></div>' ) ( $rootScope ) ;
1070
- expect ( log ) . toEqual ( '001' ) ;
1071
+ expect ( log ) . toEqual ( '002' ) ;
1072
+ } )
1073
+ ) ;
1074
+
1075
+
1076
+ it ( 'should create isolate scope even at the root of the template' , inject (
1077
+ function ( $rootScope , $compile , log ) {
1078
+ element = $compile ( '<div iscope></div>' ) ( $rootScope ) ;
1079
+ expect ( log ) . toEqual ( '002' ) ;
1071
1080
} )
1072
1081
) ;
1073
1082
} ) ;
0 commit comments