First and foremost, let me emphasize that combining JQuery with Angular is typically not advisable - so I trust you have a valid reason for doing so. In regards to your inquiry,
When you import a file using the scripts
property in angular.json, you are essentially importing the entire file and executing its code. This action takes place before your Angular app code is executed.
Conversely, when you import a module (after installing it via a package manager like npm), you have the ability to only import the necessary modules, resulting in less code being executed by the browser. Although, it's worth noting that when using JQuery, you're likely importing the entire library anyway.
If possible, I always recommend utilizing a package manager for installation, as:
- It simplifies the installation and update process
- It's a standard practice when working with frameworks like Angular
- It allows for the selective importation of specific code rather than the entire library (While this may not be significant with JQuery, it can be highly beneficial for other libraries).