MCPcopy Create free account
hub / github.com/angular/angular / App

Class App

packages/forms/test/reactive_integration_spec.ts:395–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393
394 it('should sync the disabled state if it changes right after a group is re-bound', async () => {
395 @Component({
396 imports: [FormsModule, ReactiveFormsModule, CommonModule],
397 template: `
398 <form [formGroup]="form()">
399 <input formControlName="input" />
400 </form>
401 `,
402 })
403 class App {
404 form = signal<FormGroup>(null!);
405
406 constructor(private _fb: FormBuilder) {
407 this.form.set(this._getForm());
408 }
409
410 private _getForm() {
411 return this._fb.group({'input': 'value'});
412 }
413
414 recreateAndDisable() {
415 const nextForm = this._getForm();
416 nextForm.disable();
417 this.form.set(nextForm);
418 }
419 }
420
421 const fixture = initTest(App);
422 await fixture.whenStable();

Callers

nothing calls this directly

Calls 2

ComponentInterface · 0.90
signalFunction · 0.90

Tested by

no test coverage detected