您的位置:首页 > Web前端 > AngularJS

Angular离线API文档安装指南

2014-11-26 13:08 671 查看
需要的材料:

nginx

官方angularjs zip 完整包

步骤:

1 先上www.angular.org 下载个完整的zip包

2 到nginx 网站下载 nginx

3 修改 nginx-1.6.2\conf\nginx.conf 文件, 在server_name 配置项下加入

if ( $request_uri ~ ^/(api|guide) ) {

rewrite ^(.*)$ /index-production.html last;

}

加入完成后就是这个样子
server {
        listen       80;
        server_name  localhost;
        if ( $request_uri ~ ^/(api|guide) ) { 
        rewrite ^(.*)$ /index-production.html last;
        }
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }


将下载下来的zip包解压,将docs 文件夹放入nginx 文件夹的html 文件夹中

访问:http://localhost/docs/index-production.html 即可浏览api 文档。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: