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

137
Views
Custom attribute gives parsing error when using with an angular 2.0.0-beta.0

I'm trying to use custom attribute with angular2 as following

 <a href="javascript:void(0)" title="{{inst.title}}" data-loc="{{inst.actionval}}">

which gives me following error

EXCEPTION: Template parse errors: Can't bind to 'loc' since it isn't a known native property

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Angular by default uses property binding but a doesn't have a property data-loc. To tell Angular explicitly to use attribute binding, use instead: try this one may work for you.

<a href="javascript:void(0)" title="{{inst.title}}" [attr.data-loc]="inst.actionval">

or

<a href="javascript:void(0)" title="{{inst.title}}" attr.data-loc="{{inst.actionval}}">
over 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!