I have a project in Angular that needs to be developed without an internet connection, which means the CDN links will not work. I want to save the AngularJS library to a directory within my project. This is what I attempted:
First, I visited the CDN link, copied all the code, pasted it into a file, and saved the file as angular.min.js
. Next, I commented out the script tag for the CDN in my index.html
file, and replaced it with a new script tag pointing to the locally saved file. However, when I run the project, I encounter the error "Uncaught ReferenceError: angular is not defined."
Here is how my project's file structure looks:
project
|_core
| |_public
| |_app
| |_index.html
|_libraries
|_angular.min.js
This is the script tag I used:
<script src="./../../../libraries/angular.min.js"></script>
And here is the original CDN link from where I grabbed the code:
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js