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.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Follow these steps (for Windows users):
Install
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/
Install dependencies
npm
,glub
andhttp-server
(use cmd or PowerShell)npm Insatall
npm install npm@3.10.10
gulp Insatall
npm install --global gulp-cli
http-server Insatall
npm install http-server -g
Clone the angular-material repository:
git clone https://github.com/angular/material.git
Build the repository:
cd material
npm install
Build the docs:
gulp build;
gulp docs;
gulp watch --dev
run the docs:
cd dist/docs;
http-server
Then simply go to http://192.168.42.130:8080 or http://127.0.0.1:8080
*Special thanks for Prerak Sola
You can generate the offline documentation by following the below steps:
git
,nodejs
andnpm
Install
gulp
:npm install --global gulp-cli
Clone the angular-material repository:
git clone https://github.com/angular/material.git
Build the repository:
cd material
npm install
Build the docs:
gulp watch site --dev
Currently the documentation building task is failing. I have submitted a issue here. Follow this to see what workaround or update they provide.
Update:
As per the response here, you'll need to install
node v6.10.3
andnpm 3.10.10
for building the docs locally. Install these specific versions and follow the above steps.You can clone the repo : https://github.com/angular/material
and then launch with your webserver the docs dir that has all resources generated for the documentation.
There is even a README in the doc dir : https://github.com/angular/material/blob/master/docs/README.md