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

438
Views
¿Cómo se puede asignar el valor "$ evento" a la variable de plantilla?

dado que utilizo varias entradas mat similares dentro de un formulario de plantilla, defino una plantilla ng para estas entradas mat y me refiero a ella a través de *ngTemplateOutlet y también paso datos relacionados a la plantilla como se muestra a continuación:

 <ng-template #formFieldInput let-hintMsg="hintMsg" let-lable="lable" let- dataBinding="dataBinding"> <mat-form-field appearance="outline" class="fa"> <mat-label>{{lable}}</mat-label> <input matInput type="text" name="nationalCode" [(ngModel)]="dataBinding" [disabled]="!personalInfoEdit"/> <mat-hint *ngIf="personalInfoEdit">{{hintMsg}}</mat-hint> </mat-form-field> </ng-template> // ... <ng-container *ngTemplateOutlet="formFieldInput; context:{hintMsg: 'Enter National Code', lable: 'National Code', dataBinding: profileDetails.nationalCode} "> </ng-container>

pero tengo este error:

 [webpack-dev-middleware] Error: Cannot assign value "$event" to template variable "dataBinding". Template variables are read-only.

como se puede solucionar este problema? saludos

about 4 years ago · Juan Pablo Isaza
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!