【问题标题】:How can I include ui-bootstrap in a plunker?如何在 plunker 中包含 ui-bootstrap?
【发布时间】:2013-07-10 16:46:39
【问题描述】:

我创建了以下插件:

http://plnkr.co/edit/c0pGkinMpXBBT1dpLxAo?p=preview

但这给了我一个错误,我尝试包含对 ui-bootstrap 的引用

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
    <script data-require="angular.js@1.0.x" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js" data-semver="1.0.7"></script>
    <script src="//github.com/angular-ui/bootstrap/blob/gh-pages/ui-bootstrap-0.4.0.js"></script>
    <script src="app.js"></script>
  </head>

我对创建 plunkers 不是很有经验。有人可以给我一些关于我做错了什么的建议

【问题讨论】:

    标签: javascript angularjs plunker


    【解决方案1】:

    在大多数情况下,您可以从右侧栏中找到并添加外部库(从看起来像一本书的小按钮),但我认为您的错误源于您链接到 GitHub 页面而不是实际脚本。

    正确的链接应该是: https://raw.github.com/angular-ui/bootstrap/gh-pages/ui-bootstrap-0.4.0.js

    【讨论】:

    • Plunker 并没有像它声称的那样添加外部库引用。就我而言,我试图将 ng-grid 和 ui-bootstrap 引用添加到 angularjs plunk。最令人沮丧。
    猜你喜欢
    • 1970-01-01
    • 2019-11-18
    • 1970-01-01
    • 2019-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-25
    相关资源
    最近更新 更多