Reputation: 2712
My Angular 11 application triggers this warning in console:
Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'? core.js:27937
Is there a way to trace that warning to the point in my code that might be raising it (assuming the origin is really in my code)?
Upvotes: 1
Views: 685
Reputation: 3068
Not sure what you mean by console. If you're using Jest and its outputting that message to the console, you can use jest-fail-on-console to have the warnings give you better error messages:
https://github.com/ValentinH/jest-fail-on-console#readme
failOnConsole({
shouldFailOnWarn: true,
});
Upvotes: 1