I want to install the Angular Material library in a project, but I am behind a corporate firewall and even configuring the proxy doesn't work, it seems the proxy blocks certain types of files. Is there a way to install this offline?
我想在项目中安装Angular Material库,但我支持企业防火墙,甚至配置代理也不起作用,似乎代理阻止了某些类型的文件。有没有办法离线安装?
FYI this is my BundleConfig
仅供参考,这是我的BundleConfig
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/font-awesome.min.css",
"~/Scripts/angular-loading/loading-bar.css",
"~/Scripts/nya-bs-select/nya-bs-select.min.css",
"~/Content/angular-ui-switch.css",
"~/Content/site.css"));
bundles.Add(new ScriptBundle("~/bundles/angular")
.Include("~/Scripts/angular.js",
"~/Scripts/angular-route.js",
"~/Scripts/angular-ui/ui-bootstrap-tpls.js",
"~/Scripts/AngularApp/app.js")
.IncludeDirectory("~/app", "*.js", true)
.Include("~/Scripts/smart-table/smart-table.js",
"~/Scripts/angular-loading/loading-bar.js",
"~/Scripts/nya-bs-select/nya-bs-select.min.js",
"~/Scripts/moment.js"));
3 个解决方案
#1
2
You can either use the CDN link in your reference, as explained in the docs, or download the source from CDN.
您可以使用参考中的CDN链接,如文档中所述,也可以从CDN下载源代码。
excerpt from the docs:
摘自文档:
<head>
<!-- Angular Material CSS using GitCDN to load directly from `bower-material/master` -->
<link rel="stylesheet" href="https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.css">
</head>
<body>
<!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.js"></script>
<!-- Angular Material Javascript using GitCDN to load directly from `bower-material/master` -->
<script src="https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.js"></script>
</body>
Or grab the Source
或者抓住Source
#3
0
It's really confusing; I don't know why they can't put a freakin' Zip archive on GitHub like everyone else that contains all the dependencies. (They include a Zip file, but without the distribution minified files.)
这真的令人困惑;我不知道为什么他们不能像其他包含所有依赖项的人那样在GitHub上放置一个奇怪的Zip档案。 (它们包含一个Zip文件,但没有分发缩小的文件。)
By looking at the source code of the Angular Material site, it seems you can use the following links to get the latest files:
通过查看Angular Material网站的源代码,您似乎可以使用以下链接获取最新文件:
- https://material.angularjs.org/latest/angular-material.min.js
- https://material.angularjs.org/latest/angular-material.min.js
- https://material.angularjs.org/latest/angular-material.min.css
- https://material.angularjs.org/latest/angular-material.min.css
#1
2
You can either use the CDN link in your reference, as explained in the docs, or download the source from CDN.
您可以使用参考中的CDN链接,如文档中所述,也可以从CDN下载源代码。
excerpt from the docs:
摘自文档:
<head>
<!-- Angular Material CSS using GitCDN to load directly from `bower-material/master` -->
<link rel="stylesheet" href="https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.css">
</head>
<body>
<!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.js"></script>
<!-- Angular Material Javascript using GitCDN to load directly from `bower-material/master` -->
<script src="https://gitcdn.xyz/repo/angular/bower-material/master/angular-material.js"></script>
</body>
Or grab the Source
或者抓住Source
#2
#3
0
It's really confusing; I don't know why they can't put a freakin' Zip archive on GitHub like everyone else that contains all the dependencies. (They include a Zip file, but without the distribution minified files.)
这真的令人困惑;我不知道为什么他们不能像其他包含所有依赖项的人那样在GitHub上放置一个奇怪的Zip档案。 (它们包含一个Zip文件,但没有分发缩小的文件。)
By looking at the source code of the Angular Material site, it seems you can use the following links to get the latest files:
通过查看Angular Material网站的源代码,您似乎可以使用以下链接获取最新文件:
- https://material.angularjs.org/latest/angular-material.min.js
- https://material.angularjs.org/latest/angular-material.min.js
- https://material.angularjs.org/latest/angular-material.min.css
- https://material.angularjs.org/latest/angular-material.min.css