angular - what's wrong with my code No value accessor for form control with name: 'piscina' - Stack Over

admin2025-04-22  0

Template

<div style="margin-right:10px"><p-inputSwitch [(ngModel)]="parametrosPesquisa.piscina"
name="piscina"></p-inputSwitch></div>

Code

parametrosPesquisa: ParametroPesquisaImovel;

constructor(
    private googleCloudService: GoogleCloudService,
    private imoveisService: ImoveisService,
    private route: ActivatedRoute,
    private router: Router,
    private title: Title,
    private estadoAppServico: EstadoAppService,
    private armazenamentoLocalService: ArmazenamentoLocalService
) {
    this.parametrosPesquisa = new ParametroPesquisaImovel();
}

Class definition

export class ParametroPesquisaImovel {
    piscina: boolean;
    ...
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745297766a295073.html

最新回复(0)