@@ -495,35 +495,35 @@ describe('form', function() {
495
495
expect ( doc . find ( 'div' ) . hasClass ( 'ng-valid-required' ) ) . toBe ( false ) ;
496
496
} ) ;
497
497
498
- it ( 'should leave the parent form invalid when deregister a removed input' , function ( ) {
499
- doc = jqLite (
500
- '<form name="parent">' +
501
- '<div class="ng-form" name="child">' +
502
- '<input ng-if="inputPresent" ng-model="modelA" name="inputA" required>' +
503
- '<input ng-model="modelB" name="inputB" required>' +
504
- '</div>' +
505
- '</form>' ) ;
506
- $compile ( doc ) ( scope ) ;
507
- scope . inputPresent = true ;
508
- scope . $apply ( ) ;
498
+ it ( 'should leave the parent form invalid when deregister a removed input' , function ( ) {
499
+ doc = jqLite (
500
+ '<form name="parent">' +
501
+ '<div class="ng-form" name="child">' +
502
+ '<input ng-if="inputPresent" ng-model="modelA" name="inputA" required>' +
503
+ '<input ng-model="modelB" name="inputB" required>' +
504
+ '</div>' +
505
+ '</form>' ) ;
506
+ $compile ( doc ) ( scope ) ;
507
+ scope . inputPresent = true ;
508
+ scope . $apply ( ) ;
509
509
510
- var parent = scope . parent ,
511
- child = scope . child ,
512
- inputA = child . inputA ,
513
- inputB = child . inputB ;
510
+ var parent = scope . parent ,
511
+ child = scope . child ,
512
+ inputA = child . inputA ,
513
+ inputB = child . inputB ;
514
514
515
- expect ( parent ) . toBeDefined ( ) ;
516
- expect ( child ) . toBeDefined ( ) ;
517
- expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
518
- expect ( child . $error . required ) . toEqual ( [ inputB , inputA ] ) ;
515
+ expect ( parent ) . toBeDefined ( ) ;
516
+ expect ( child ) . toBeDefined ( ) ;
517
+ expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
518
+ expect ( child . $error . required ) . toEqual ( [ inputB , inputA ] ) ;
519
519
520
- //remove child input
521
- scope . inputPresent = false ;
522
- scope . $apply ( ) ;
520
+ //remove child input
521
+ scope . inputPresent = false ;
522
+ scope . $apply ( ) ;
523
523
524
- expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
525
- expect ( child . $error . required ) . toEqual ( [ inputB ] ) ;
526
- } ) ;
524
+ expect ( parent . $error . required ) . toEqual ( [ child ] ) ;
525
+ expect ( child . $error . required ) . toEqual ( [ inputB ] ) ;
526
+ } ) ;
527
527
528
528
it ( 'should chain nested forms in repeater' , function ( ) {
529
529
doc = jqLite (
0 commit comments