Closed rainerhahnekamp closed 10 months ago
Congrats to the schematics. Really good!
Unfortunately, I have the following file content which fails to migrate to Signals Input:
@Component({ selector: 'app-request-info', templateUrl: './request-info.component.html', standalone: true, imports: [ ReactiveFormsModule, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule, AsyncPipe, NgIf, ], }) export class RequestInfoComponent implements OnInit { #formBuilder = inject(NonNullableFormBuilder); #lookuper = inject(AddressLookuper); formGroup = this.#formBuilder.group({ address: [''], }); title = 'Request More Information'; @Input() address = ''; submitter$ = new Subject<void>(); lookupResult$: Observable<string> | undefined; ngOnInit(): void { if (this.address) { this.formGroup.setValue({ address: this.address }); } this.lookupResult$ = this.submitter$.pipe( switchMap(() => { assertDefined(this.formGroup.value.address); return this.#lookuper.lookup(this.formGroup.value.address); }), map((found) => (found ? 'Brochure sent' : 'Address not found')), ); } search(): void { this.submitter$.next(); } }
This is the command I run and its output
Thanks for providing the content. I'll work on a fix
Congrats to the schematics. Really good!
Unfortunately, I have the following file content which fails to migrate to Signals Input:
This is the command I run and its output