Andrew B Schultz
Andrew B Schultz

Reputation: 1512

Angular - CDN reference works, local min file does not

I have an HTML file with some Javascript in it. I'm using Angular.js. If I reference the CDN, like this:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>

everything works fine. If I try to use a local angular.js or angular.min.js file, the Angular functions break:

<script src="../Javascript/angular.js"></script>

Is there a known reason for this? Nothing else changes. My problem is that I'm not sure if my code can get to the CDN where I'm deploying it. The Angular functions aren't working in the deployment location with the CDN reference, and I want to test with the local reference, but I can't get it working in dev in the first place.

Upvotes: 5

Views: 4458

Answers (1)

Nishchit
Nishchit

Reputation: 19084

Download latest version of angular from here Download

And include Angular.js file in head tag

<src href="path/to/angular.js" ></script>

To check file loaded or not go to console (F12) and click on network .

I hope this may help you .

Download latest version of angular from here Download

Upvotes: 1

Related Questions