Angular离线API文档安装指南

来源:互联网 发布:单片机1ms延时程序 编辑:程序博客网 时间:2024/04/28 13:51

需要的材料:

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 文档。


0 0
原创粉丝点击