I have compiled the newest angular.js and find out that links in the doc all point to absolute URL angularjs.org/.... I want to be able to read the doc locally.
8 Answers
You have to run a webserver ("python -m SimpleHTTPServer
) to properly browse the docs.
As an alternative, you might want to try Dash
for offline documentation for many APIs - http://kapeli.com/dash

- 290,304
- 63
- 469
- 417
-
I didn't know that python supports .htaccess file. I realized that I have already installed node.js - is there any suitable alternative to python? – honzajde Apr 28 '13 at 21:47
-
Warning : in order to do that 1) you have to copy angular*.js files under 'docs/' 2) doc files uses semicolons (:) in their names which is not handled in windows -> you have to use an unix. With that, offline doc works with the python server given in this answer. – Offirmo Jul 23 '13 at 13:00
"Dash" which is mentioned in another answer costs around $20.
For a free solution, check out http://devdocs.io/
Clone the angular source code in order to have access to the docs directory of all released (and yet unreleased) versions locally.

- 4,853
- 4
- 44
- 51
Local AngularJS API Docs
Here's how I hosted the Angular.JS documentation locally, on my Mac:
- Download the zipped version of the Angular.JS Build, which contains both the builds of AngularJS, as well as documentation and other extras.
- Unzip the Angular.JS docs folder.
- Download and install Node.JS.
- Using Mac Terminal, install the npm package http-server globally so that it can be run from the command line.
$ sudo npm install -g http-server
- cd to the Angular.JS docs folder and start-up
http-server
.
$ http-server -a 127.0.0.1
Starting up http-server, serving ./ on: http://127.0.0.1:8080
- Use your browser to view the docs @ http://127.0.0.1:8080/index-production.html
Note:
Using the default served by http-server
(http://0.0.0.0:8080) and http://0.0.0.0:8080/index-production.html in Chrome will end up in a google search. Alternatively you can create a bookmark and Chrome will stop searching for it.

- 5,832
- 1
- 18
- 27
-
It's not like it doesn't like it, but 0.0.0.0 has a special meaning in networking. It basically means that `http-server` serves the content in `:8080` in all your computer's interfaces. If you have 5 interfaces, with 5 different IP addresses. Listening on `0.0.0.0:8080` means that you can get the content from any of those 5 addresses. – ILikeTacos May 13 '16 at 03:17
-
Ah! Thanks for the info! http://www.howtogeek.com/225487/what-is-the-difference-between-127.0.0.1-and-0.0.0.0/ | http://serverfault.com/a/300410 – SimplyInk May 13 '16 at 03:53
-
thanks, but this is just overkill.. why not just to have some archive with html files =/ – holms Nov 09 '16 at 04:41
-
@holms see: http://stackoverflow.com/questions/21408510/chrome-cant-load-web-worker – SimplyInk Feb 16 '17 at 04:01
download the lastest version of the doc, then run python -m SimpleHTTPServer
, in your browser enter the following url: localhost:8000/index-production.html , it works for me.
If you want a complete local AngularJS documentation, you can clone the angular/angular.js repository on Github. The nodejs webserver is already included.
You just need to install nodejs dependencies (npm install
) and build (grunt package
), and you can run the local webserver with grunt webserver
.
All the documentation (API, tutorials, etc ...) will be available on your computer at http://localhost:8000/build/docs

- 1,252
- 1
- 8
- 13
For a free and open source version of Dash, use Zeal to provide offline documentation. It's also very nice when integrated with your editor (Submlime in my case).

- 4,632
- 2
- 24
- 34
if you are developing a site using "localhost/your-project" and refer the angular.js file as: "localhost/your-project/js/angular.js" then, you can access the docs by: "localhost/your-project/js/docs/index.html"

- 1
For those with WampServer (or anyother *AMP application ), Simply point your Web Browser to your offline docs ,
http://localhost/angularjs/1.5.3/docs/
it works like charm.

- 1,943
- 22
- 27