admin管理员组

文章数量:1312889

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?

FYI this is my 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"));

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?

FYI this is my 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"));
Share Improve this question edited Nov 12, 2015 at 12:01 NZJames asked Nov 12, 2015 at 11:38 NZJamesNZJames 5,05515 gold badges57 silver badges109 bronze badges 2
  • Just go to the angular website and download angular and include it into your project – Deblaton Jean-Philippe Commented Nov 12, 2015 at 11:41
  • 1 Can you use the CDN instead? github./angular/material#cdn – Patrick Commented Nov 12, 2015 at 11:41
Add a ment  | 

3 Answers 3

Reset to default 2

You can either use the CDN link in your reference, as explained in the docs, or download the source from 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./ajax/libs/angularjs/1.3.15/angular.js"></script>
    <script src="https://ajax.googleapis./ajax/libs/angularjs/1.3.15/angular-animate.js"></script>
    <script src="https://ajax.googleapis./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

download from here, save of your pc and include in your project ?

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.)

By looking at the source code of the Angular Material site, it seems you can use the following links to get the latest files:

  • https://material.angularjs/latest/angular-material.min.js
  • https://material.angularjs/latest/angular-material.min.css

本文标签: javascriptCan I install Angular Material library without Bower or NPMStack Overflow