Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
Using Local reference breaks while create a staging/production build (Angular)

Following are the template code and the error I get while creating the build although it works fine when I do ng serve.

<input type="text" class="form-control unit-price"  name="unit_price" [(ngModel)]="item.unit_price" #unitPrice="ngModel" required>
           <span class="small text-danger" *ngIf="!unitPrice?.valid && unitPrice?.touched ">Field is Required</span>

enter image description here

Any thing I am missing ?

Will I have to declare that property in component ?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

On my UnderStanding There is no unitPrice field inside the item object please verify the item object that you had mentioned in the [(ngModel)].

about 4 years ago · Juan Pablo Isaza Denunciar

0

On the other hand, convert this: #unitPrice="ngModel" to this: #unit_price="ngModel" in your code.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda