Closed jonathanblancor closed 11 months ago
Yes, this is a compatibility issue with Angular 7.
I am wondering if these are compatibility issues. If so, what versions of AI and the angular plugin should I use for Angular 7?
For Applicaiton Insights you can (should) be able to use any version, however, for the @microsoft/applicationinsights-angularplugin-js
this is built using specific version of Angular and is where the issue is coming from.
What you can do for your Angular 7 app is to create your own Angular extension using the code in this repo as a guide, as all of the necessary components to create you own extensions are exported from the main Application Insights code.
@MSNev Thank you for that solution.
So far there is not a lot we need to track.
1- So if I don't use this angular plugin (or my own extension), what functionality would I be missing if just using the AI library on its own instead?
2- I read that setting enableAutoRouteTracking: true
would do the route tracking, eliminating some of the need for the angular plugin?
This plugin is really just providing the necessary "Hooks" for
Simplistically, if your app does change the browser URL (using #
of otherwise) so that the locating history
API provides the necessary "Page view(s)" for you then the only issue would be the Error Service.
Additional Note: enableAutoRouteTracking
WILL cause a new "PageView" for EVERY URL (history) change, so (if) you change the URL (even just to save user input or display a dialog), this will cause multiple Page view events.
Thank you for your help! Closing the ticket.
Hi,
I have an app in Angular v7.2.16. I am using
I am getting this warning when building
And this error when accessing the app
I see the compatibility-matrix starts at Angular v11. I am wondering if these are compatibility issues. If so, what versions of AI and the angular plugin should I use for Angular 7?
This is
package.json
. Please let me know if you need more information. Thank you.