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

98
Views
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 answers
Answer question

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 Report

0

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

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