@@ -547,35 +547,35 @@ describe('form', function() {
547
547
expect ( doc . find ( 'div' ) . hasClass ( 'ng-pending' ) ) . toBe ( false ) ;
548
548
} ) ;
549
549
550
- it ( 'should leave the parent form invalid when deregister a removed input' , function ( ) {
551
- doc = jqLite (
552
- '<form name="parent">' +
553
- '<div class="ng-form" name="child">' +
554
- '<input ng-if="inputPresent" ng-model="modelA" name="inputA" required>' +
555
- '<input ng-model="modelB" name="inputB" required>' +
556
- '</div>' +
557
- '</form>' ) ;
558
- $compile ( doc ) ( scope ) ;
559
- scope . inputPresent = true ;
560
- scope . $apply ( ) ;
550
+ it ( 'should leave the parent form invalid when deregister a removed input' , function ( ) {
551
+ doc = jqLite (
552
+ '<form name="parent">' +
553
+ '<div class="ng-form" name="child">' +
554
+ '<input ng-if="inputPresent" ng-model="modelA" name="inputA" required>' +
555
+ '<input ng-model="modelB" name="inputB" required>' +
556
+ '</div>' +
557
+ '</form>' ) ;
558
+ $compile ( doc ) ( scope ) ;
559
+ scope . inputPresent = true ;
560
+ scope . $apply ( ) ;
561
561
562
- var parent = scope . parent ,
563
- child = scope . child ,
564
- inputA = child . inputA ,
565
- inputB = child . inputB ;
562
+ var parent = scope . parent ,
563
+ child = scope . child ,
564
+ inputA = child . inputA ,
565
+ inputB = child . inputB ;
566
566
567
- expect ( parent ) . toBeDefined ( ) ;
568
- expect ( child ) . toBeDefined ( ) ;
569
- expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
570
- expect ( child . $error . required ) . toEqual ( [ inputB , inputA ] ) ;
567
+ expect ( parent ) . toBeDefined ( ) ;
568
+ expect ( child ) . toBeDefined ( ) ;
569
+ expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
570
+ expect ( child . $error . required ) . toEqual ( [ inputB , inputA ] ) ;
571
571
572
- //remove child input
573
- scope . inputPresent = false ;
574
- scope . $apply ( ) ;
572
+ //remove child input
573
+ scope . inputPresent = false ;
574
+ scope . $apply ( ) ;
575
575
576
- expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
577
- expect ( child . $error . required ) . toEqual ( [ inputB ] ) ;
578
- } ) ;
576
+ expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
577
+ expect ( child . $error . required ) . toEqual ( [ inputB ] ) ;
578
+ } ) ;
579
579
580
580
it ( 'should chain nested forms in repeater' , function ( ) {
581
581
doc = jqLite (
0 commit comments