如何在本地运行 angularjs 材料文档 [英] How to run angularjs material documentation locally
问题描述
我已经编译了最新的 angularjs 材料,并发现文档中的链接都指向绝对 URL material.angularjs.org/.... 我希望能够阅读本地文档和演示内容.
I have compiled the newest angularjs material and find out that links in the doc all point to absolute URL material.angularjs.org/.... I want to be able to read the doc and demo content locally.
推荐答案
请按照以下步骤操作(适用于 Windows 用户):
Follow these steps (for Windows users):
安装
git
、Node v6.10.3
Git https://git-for-windows.github.io/
Node v6.10.3 https://nodejs.org/en/blog/release/v6.10.3/
Node v6.10.3 https://nodejs.org/en/blog/release/v6.10.3/
安装依赖项 npm
、glub
和 http-server
(使用 cmd 或PowerShell)
Install dependencies npm
,glub
and http-server
(use cmd or
PowerShell)
npm Insatall npm install npm@3.10.10
npm Insatall npm install npm@3.10.10
gulp Insatall npm install --global gulp-cli
gulp Insatall npm install --global gulp-cli
http-server Insatall npm install http-server -g
http-server Insatall npm install http-server -g
克隆 angular-material 存储库:
Clone the angular-material repository:
git clone https://github.com/angular/material.git
构建存储库:
cd 素材
npm install
构建文档:
gulp build;
gulp 文档;
gulp watch --dev
运行文档:
cd dist/docs;
http-server
然后只需转到 http://192.168.42.130:8080 或 http://127.0.0.1:8080
*特别感谢 Prerak Sola
这篇关于如何在本地运行 angularjs 材料文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!