0
I have a field on the form with radio Buttons:
<div class="form-group" >
<label class="control-label col-md-4">Tipo Atividade2*:</label>
<input type="radio" [(ngModel)]="atividadeFixa" value="true" required> Fixa<br>
<input type="radio" [(ngModel)]="atividadeFixa" value="false" required> Não Fixa<br>
</div>
I need to Load the value who comes from the back to the front. How can I do this ?
object code:
export class Atividade {
atividadeFixa: boolean
}
code service
editarAtividade(atividade : Atividade) : Observable<any>{
//return Observable.of("Edition not implemented yet")
let params = this.setParamsAtividade(atividade)
params.set("atividade", atividade.id.toString())
return this.http.doPut(Rotas.ATIVIDADE, params)
}
Which version of the angular vc is using?
– Rafael Rotiroti
I’m using the version of angular 6.0
– alexjosesilva
Make a string Interpolation n resolve?
value="{{valor}}"
– Jorge.M
[checked] = activity.activity ??
– alexjosesilva
You want to
checar
the Rado button according to what comes from the back? If it is, how comes this back value?– Jorge.M
that’s right. Doubt is at the value that comes from the back
– alexjosesilva
And how comes that value?
– Jorge.M
the value type Boolean
– alexjosesilva