Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Angular 2 -> cómo ocultar controles usando FormGroup

¿Hay alguna forma de controlar la visibilidad de los controles usando FormGroup (TypeScript Angular 2).

Me las arreglo para escribir el siguiente código:

 this.myDoch.controls['text1'].disable();

pero solo bloquea el control, busco ocultar el control.

Gracias.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Puedes usar disabled así:

HTML

 <input [ngClass]="{'hidden': link.controls.title.disabled}" type="text" formControlName="title" />

componente.ts

 linkArry.controls[0].disable();

CSS

.hidden {display:none;}

about 4 years ago · Santiago Trujillo Report

0

Puede usar el selector css 'deshabilitado'. Por ejemplo :

 .my-input:disabled { display:none; }

Puedes leer sobre esto aquí .

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!