@@ -1885,15 +1885,15 @@ describe('$compile', function() {
1885
1885
1886
1886
it ( 'should allow creation of new scopes' , inject ( function ( $rootScope , $compile , log ) {
1887
1887
element = $compile ( '<div><span scope><a log></a></span></div>' ) ( $rootScope ) ;
1888
- expect ( log ) . toEqual ( '002 ; log-002-001 ; LOG' ) ;
1888
+ expect ( log ) . toEqual ( '2 ; log-2-1 ; LOG' ) ;
1889
1889
expect ( element . find ( 'span' ) . hasClass ( 'ng-scope' ) ) . toBe ( true ) ;
1890
1890
} ) ) ;
1891
1891
1892
1892
1893
1893
it ( 'should allow creation of new isolated scopes for directives' , inject (
1894
1894
function ( $rootScope , $compile , log ) {
1895
1895
element = $compile ( '<div><span iscope><a log></a></span></div>' ) ( $rootScope ) ;
1896
- expect ( log ) . toEqual ( 'log-001 -no-parent; LOG; 002 ' ) ;
1896
+ expect ( log ) . toEqual ( 'log-1 -no-parent; LOG; 2 ' ) ;
1897
1897
$rootScope . name = 'abc' ;
1898
1898
expect ( iscope . $parent ) . toBe ( $rootScope ) ;
1899
1899
expect ( iscope . name ) . toBeUndefined ( ) ;
@@ -1905,11 +1905,11 @@ describe('$compile', function() {
1905
1905
$httpBackend . expect ( 'GET' , 'tscope.html' ) . respond ( '<a log>{{name}}; scopeId: {{$id}}</a>' ) ;
1906
1906
element = $compile ( '<div><span tscope></span></div>' ) ( $rootScope ) ;
1907
1907
$httpBackend . flush ( ) ;
1908
- expect ( log ) . toEqual ( 'log-002-001 ; LOG; 002 ' ) ;
1908
+ expect ( log ) . toEqual ( 'log-2-1 ; LOG; 2 ' ) ;
1909
1909
$rootScope . name = 'Jozo' ;
1910
1910
$rootScope . $apply ( ) ;
1911
- expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 002 ' ) ;
1912
- expect ( element . find ( 'span' ) . scope ( ) . $id ) . toBe ( '002' ) ;
1911
+ expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 2 ' ) ;
1912
+ expect ( element . find ( 'span' ) . scope ( ) . $id ) . toBe ( 2 ) ;
1913
1913
} ) ) ;
1914
1914
1915
1915
@@ -1919,11 +1919,11 @@ describe('$compile', function() {
1919
1919
respond ( '<p><a log>{{name}}; scopeId: {{$id}}</a></p>' ) ;
1920
1920
element = $compile ( '<div><span trscope></span></div>' ) ( $rootScope ) ;
1921
1921
$httpBackend . flush ( ) ;
1922
- expect ( log ) . toEqual ( 'log-002-001 ; LOG; 002 ' ) ;
1922
+ expect ( log ) . toEqual ( 'log-2-1 ; LOG; 2 ' ) ;
1923
1923
$rootScope . name = 'Jozo' ;
1924
1924
$rootScope . $apply ( ) ;
1925
- expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 002 ' ) ;
1926
- expect ( element . find ( 'a' ) . scope ( ) . $id ) . toBe ( '002' ) ;
1925
+ expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 2 ' ) ;
1926
+ expect ( element . find ( 'a' ) . scope ( ) . $id ) . toBe ( 2 ) ;
1927
1927
} ) ) ;
1928
1928
1929
1929
@@ -1933,12 +1933,12 @@ describe('$compile', function() {
1933
1933
respond ( '<p><a log>{{name}}; scopeId: {{$id}} |</a></p>' ) ;
1934
1934
element = $compile ( '<div><span ng-repeat="i in [1,2,3]" trscope></span></div>' ) ( $rootScope ) ;
1935
1935
$httpBackend . flush ( ) ;
1936
- expect ( log ) . toEqual ( 'log-003-002 ; LOG; 003 ; log-005-004 ; LOG; 005 ; log-007-006 ; LOG; 007 ' ) ;
1936
+ expect ( log ) . toEqual ( 'log-3-2 ; LOG; 3 ; log-5-4 ; LOG; 5 ; log-7-6 ; LOG; 7 ' ) ;
1937
1937
$rootScope . name = 'Jozo' ;
1938
1938
$rootScope . $apply ( ) ;
1939
- expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 003 |Jozo; scopeId: 005 |Jozo; scopeId: 007 |' ) ;
1940
- expect ( element . find ( 'p' ) . scope ( ) . $id ) . toBe ( '003' ) ;
1941
- expect ( element . find ( 'a' ) . scope ( ) . $id ) . toBe ( '003' ) ;
1939
+ expect ( element . text ( ) ) . toBe ( 'Jozo; scopeId: 3 |Jozo; scopeId: 5 |Jozo; scopeId: 7 |' ) ;
1940
+ expect ( element . find ( 'p' ) . scope ( ) . $id ) . toBe ( 3 ) ;
1941
+ expect ( element . find ( 'a' ) . scope ( ) . $id ) . toBe ( 3 ) ;
1942
1942
} ) ) ;
1943
1943
1944
1944
@@ -1947,7 +1947,7 @@ describe('$compile', function() {
1947
1947
$httpBackend . expect ( 'GET' , 'tiscope.html' ) . respond ( '<a log></a>' ) ;
1948
1948
element = $compile ( '<div><span tiscope></span></div>' ) ( $rootScope ) ;
1949
1949
$httpBackend . flush ( ) ;
1950
- expect ( log ) . toEqual ( 'log-002-001 ; LOG; 002 ' ) ;
1950
+ expect ( log ) . toEqual ( 'log-2-1 ; LOG; 2 ' ) ;
1951
1951
$rootScope . name = 'abc' ;
1952
1952
expect ( iscope . $parent ) . toBe ( $rootScope ) ;
1953
1953
expect ( iscope . name ) . toBeUndefined ( ) ;
@@ -1967,7 +1967,7 @@ describe('$compile', function() {
1967
1967
'</b>' +
1968
1968
'</div>'
1969
1969
) ( $rootScope ) ;
1970
- expect ( log ) . toEqual ( '002; 003 ; log-003-002 ; LOG; log-002-001 ; LOG; 004 ; log-004-001 ; LOG' ) ;
1970
+ expect ( log ) . toEqual ( '2; 3 ; log-3-2 ; LOG; log-2-1 ; LOG; 4 ; log-4-1 ; LOG' ) ;
1971
1971
} )
1972
1972
) ;
1973
1973
@@ -1976,7 +1976,7 @@ describe('$compile', function() {
1976
1976
'the scope' , inject (
1977
1977
function ( $rootScope , $compile , log ) {
1978
1978
element = $compile ( '<div class="scope-a; scope-b"></div>' ) ( $rootScope ) ;
1979
- expect ( log ) . toEqual ( '002; 002 ' ) ;
1979
+ expect ( log ) . toEqual ( '2; 2 ' ) ;
1980
1980
} )
1981
1981
) ;
1982
1982
@@ -2012,15 +2012,15 @@ describe('$compile', function() {
2012
2012
it ( 'should create new scope even at the root of the template' , inject (
2013
2013
function ( $rootScope , $compile , log ) {
2014
2014
element = $compile ( '<div scope-a></div>' ) ( $rootScope ) ;
2015
- expect ( log ) . toEqual ( '002 ' ) ;
2015
+ expect ( log ) . toEqual ( '2 ' ) ;
2016
2016
} )
2017
2017
) ;
2018
2018
2019
2019
2020
2020
it ( 'should create isolate scope even at the root of the template' , inject (
2021
2021
function ( $rootScope , $compile , log ) {
2022
2022
element = $compile ( '<div iscope></div>' ) ( $rootScope ) ;
2023
- expect ( log ) . toEqual ( '002 ' ) ;
2023
+ expect ( log ) . toEqual ( '2 ' ) ;
2024
2024
} )
2025
2025
) ;
2026
2026
@@ -3871,8 +3871,8 @@ describe('$compile', function() {
3871
3871
element = $compile ( '<div><div trans>T:{{$parent.$id}}-{{$id}}<span>;</span></div></div>' )
3872
3872
( $rootScope ) ;
3873
3873
$rootScope . $apply ( ) ;
3874
- expect ( element . text ( ) ) . toEqual ( 'W:001-002 ;T:001-003 ;' ) ;
3875
- expect ( jqLite ( element . find ( 'span' ) [ 0 ] ) . text ( ) ) . toEqual ( 'T:001-003 ' ) ;
3874
+ expect ( element . text ( ) ) . toEqual ( 'W:1-2 ;T:1-3 ;' ) ;
3875
+ expect ( jqLite ( element . find ( 'span' ) [ 0 ] ) . text ( ) ) . toEqual ( 'T:1-3 ' ) ;
3876
3876
expect ( jqLite ( element . find ( 'span' ) [ 1 ] ) . text ( ) ) . toEqual ( ';' ) ;
3877
3877
} ) ;
3878
3878
} ) ;
@@ -4308,7 +4308,7 @@ describe('$compile', function() {
4308
4308
inject ( function ( $compile ) {
4309
4309
element = $compile ( '<div transclude>{{$id}}</div>' ) ( $rootScope ) ;
4310
4310
$rootScope . $apply ( ) ;
4311
- expect ( element . text ( ) ) . toBe ( $rootScope . $id ) ;
4311
+ expect ( element . text ( ) ) . toBe ( '' + $rootScope . $id ) ;
4312
4312
} ) ;
4313
4313
4314
4314
} ) ;
@@ -4544,7 +4544,7 @@ describe('$compile', function() {
4544
4544
( $rootScope ) ;
4545
4545
$rootScope . $apply ( ) ;
4546
4546
expect ( log ) . toEqual ( 'compile: <!-- trans: text -->; link; LOG; LOG; HIGH' ) ;
4547
- expect ( element . text ( ) ) . toEqual ( '001-002;001-003 ;' ) ;
4547
+ expect ( element . text ( ) ) . toEqual ( '1-2;1-3 ;' ) ;
4548
4548
} ) ;
4549
4549
} ) ;
4550
4550
0 commit comments