• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

168
Views
Is there a way to catch expression change error?

I'm getting NG0100 error (Expression changed) in my console. Is there any way I can catch this error in my code and print it in the console via my code?

I tried try catch block but it doesn't seem to be working.

try{
//error generating code
}
catch(e){
console.log(e.message)
}

Thanks!

over 2 years ago · Santiago Trujillo
1 answers
Answer question

0

Actually, catch a NG0100 won't help that much. It's not a blocking error, it's just a big warning to tell yout that your code is unsafe and some expressions change at a point of the component genereation where it shouldn't.

It is supported by Angular DoubleCheck wich is a system that check your template binded attributes to make sure your code is stable and predictable. NG0100 means your expression has changed between these two checks. It is just a warning because this DoubleCheck only exists in devmode (aka ng serve or ng build --configuration developement).

Best you can do is find why and where this happens in your code, to avoid it. The informations given can't let us know, but you can watch this video from Angular official documentation that explains most common reasons of NG0100

over 2 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error