无法在本地运行角度材料文档 [英] Not able to run angular material docs on locally
问题描述
环境:Windows 7、npm 2.11.3、bower 1.4.1、gulp CLI 3.9.0
Environment: Windows 7, npm 2.11.3, bower 1.4.1, gulp CLI 3.9.0
我克隆了角度材料(https://github.com/angular/material/tree/v0.10.1) 使用 WebStorm.我按照 (https://github.com/angular/material/tree/v0.10.1/docs) 在本地安装 angular-material.
I Cloned angular material (https://github.com/angular/material/tree/v0.10.1) using WebStorm. I followed the (https://github.com/angular/material/tree/v0.10.1/docs) to install angular-material locally.
在根目录 /
我运行 npm install
它运行(有一些警告)并下载了它的依赖项(我的 npm -v
是 2.11.3)
I run npm install
it runs (with some warnings) and downloaded its dependencies (my npm -v
is 2.11.3)
在运行 bower install
但它给出以下
In run bower install
but its gives following
D:\material>凉亭安装bower ENOENT 不存在 bower.json
然后我运行 gulp docs
来构建文档,它是在根目录下构建和创建的 /dist
文件夹.在我运行 gulp server
命令实时重新加载之后.它说 Webserver starts at http://0.0.0.0:8080
我在 bower 上看到但没有运气,也尝试过 http://localhost:8080
仍然存在没有运气.
then I run gulp docs
to build docs, it was build and created /dist
folder at root directory. after I run the gulp server
command to live reload. Its said Webserver started at http://0.0.0.0:8080
I saw on bower but no luck, also tried alternativly as http://localhost:8080
still there is no luck.
另一种使用 httpster 的替代方法,我安装了它并运行 httpster -p 8080 -d ./dist/docs
它说 Starting HTTPster v1.0.1 on port "8080" from ./分发/文档
我再次浏览 localhost:8080
然后它在crome的开发者工具的索引页面中给我错误,如下
One more alternative using httpster, I installed it and run httpster -p 8080 -d ./dist/docs
it said Starting HTTPster v1.0.1 on port "8080" from ./dist/docs
again i browse localhost:8080
then its gives me error in index page on developer tool of crome as below
未捕获的错误:[$injector:nomod] http://errors.angularjs.org/1.4.3/$injector/nomod?p0=material.components.menuangular.js:4369 未捕获的错误:[$injector:modulerr] http://errors.angularjs.org/1.4.3/$injector/modulerr?p0=docsApp&p1=Error%3A…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.3%2Fangular.min.js%3A19%3A339)
Uncaught Error: [$injector:nomod] http://errors.angularjs.org/1.4.3/$injector/nomod?p0=material.components.menu angular.js:4369 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.3/$injector/modulerr?p0=docsApp&p1=Error%3A…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.3%2Fangular.min.js%3A19%3A339)
请帮助我做些什么来获得好运.
Please help what can I do to get my luck.
推荐答案
Paul(google 上的 ngmaterial 组)解决了我的问题,但是网站正在加载演示页面不起作用.
Paul (ngmaterial group on google) solved my problem, However site is loading demo pages not working.
尝试将 material-0.10.1\src\components\menu 中的 _menu.js 重命名为 menu-a.js.在我的情况下,确保以正确的顺序添加两个 js 文件.
Try renaming _menu.js in material-0.10.1\src\components\menu to menu-a.js. In my case that ensured the two js files were added in the correct order.
这篇关于无法在本地运行角度材料文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!