2

Hi I am developing angularjs application. I was using below link to refer angularjs.

 <script data-require="[email protected]" data-semver="1.4.5" src="https://code.angularjs.org/1.4.5/angular.js"></script>

I am getting below error. https://code.angularjs.org/1.4.5/angular.js net::ERR_CONNECTION_TIMED_OUT

suddenly now i am not able to load this library. Is there any problem with angular site? Anyone else facing this issue? Thank you.

1
  • 3
    Love all the answers of "CDN is down, use a CDN" :D Commented May 2, 2017 at 5:22

5 Answers 5

2

Its always better to use bower and install the library which you want to use.

Use some package manager like bower to load your dependencies.

Don't rely on the cdn/library url , sometimes they update the url on anytime and it might get timed out.

Sign up to request clarification or add additional context in comments.

Comments

2

The given library link is not working. Use the below cdn url : https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.js

Comments

1

The hosted library is not loading, you can check it by directly accessing https://code.angularjs.org/1.4.5/angular.js

Use src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js" instead.

4 Comments

Thank you. Worked like charm. May i know why this happened? I scratched my head for one hour!
@NiranjanGodbole do not rely on online libraries
its not a recommended way to use min.js file in production
It looks like the site code.angularjs.org is down, or something is wrong with that. Anytime if you think any of your library is not loading, try accessing them directly on the url box and check it. :)
1

your CDN link is down for some reason. you can use the bellow link. It is better not to use the CDN. Try to use the downloaded file instead.

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.js"></script>

Comments

1

It's better you use a package manager like bower which would help to manage all dependent packages of your project and load them easily. A simple bower.json example i have provided below. It's better you avoid using online CDN hosted libraries.

{
  "name": "angular-seed",
  "description": "A starter project for AngularJS",
  "version": "0.0.0",
  "homepage": "https://github.com/angular/angular-seed",
  "license": "MIT",
  "private": true,
  "dependencies": {
    "angular": "~1.5.0",
    "angular-route": "~1.5.0",
    "angular-loader": "~1.5.0",
    "angular-mocks": "~1.5.0",
    "html5-boilerplate": "^5.3.0"
  }
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.