I found a case where change detection enters an infinite loop on an error.
The code in question:
@Component({selector: "signup-comp"})
@View({
directives: [CORE_DIRECTIVES, FORM_DIRECTIVES],
template: `
<form #f="form" (ng-submit)='onSignUp(f.value)'>
<div ng-control-group='credentials' #credentials="form">
Login <input type='text' ng-control='login'>
Password <input type='password' ng-control='password'>
</div>
<div *ng-if="!d.valid">Credentials are invalid</div>
<div ng-control-group='personal'>
Name <input type='text' ng-control='name'>
</div>
<button type='submit'>Sign Up!</button>
</form>
`
})
The key is the ng-if expression !d.valid. d is not defined, and this triggers an infinite loop.
Here is a full Plunker example.
I found a case where change detection enters an infinite loop on an error.
The code in question:
The key is the
ng-ifexpression!d.valid.dis not defined, and this triggers an infinite loop.Here is a full Plunker example.