Reputation: 7595
I have an Angular 8 app which is quite far behind the latest version of Angular. When I'm considering including an Angular library, how do I know if it is compatible with Angular 8? Is there a strict version alignment i.e. can my app only using Angular 8 libraries? Does it just depend on the library and what Angular features it requires? How will I know if it is not compatible? Is it just a matter of trial and error? Is it possible that my app will load multiple versions of Angular, or is that not possible. Is this just another form of 'DLL hell'?
Upvotes: 1
Views: 1154
Reputation: 31
There is really no good way of knowing without trying chances it might work thanks to the ivy engine feature called ngcc.
Ivy applications can be built with libraries that were created with the View Engine compiler. This compatibility is provided by a tool known as the Angular compatibility compiler (ngcc).
Trying to load multiple versions in one is just a bad idea and probably impossible with how angular is structured.
I'd suggest trying it on a new git branch and if it doesn't work just discard it.
You can get an older version from npm for example ngx bootstrap npm i [email protected]
you get version 7.0.1 of ngx bootstrap, here you might stumble upon security issues that have been patched in the newer versions but since you are still on angular 8 that is the least of your worries.
If possible your main priority should be to update angular to the latest version, this might be a big task depending on how huge your application is and your understanding of angular.
Upvotes: 2