加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – ui-bootstrap-tpls.min.js和ui-bootstrap.min.js之

发布时间:2020-12-17 09:31:14 所属栏目:安全 来源:网络整理
导读:在cdnjs的 Angular-UI-Bootstrap page,说: 本地AngularJS(Angular)指令为Twitter的Bootstrap。小脚本(5kB gzipped!),没有第三方JS依赖(jQuery,bootstrap JS)需要! …并有选项 //cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.6.0/ui-bootstr
在cdnjs的 Angular-UI-Bootstrap page,说:

本地AngularJS(Angular)指令为Twitter的Bootstrap。小脚本(5kB gzipped!),没有第三方JS依赖(jQuery,bootstrap JS)需要!

…并有选项

//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.6.0/ui-bootstrap-tpls.min.js

//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.6.0/ui-bootstrap.min.js

差异这些显示了一个微妙的差别,我似乎找不到任何文档…

编辑:

Long story short use tpls unless you are going to create customized
templates.

编辑:

It is documented here:
github.com/angular-ui/bootstrap/tree/gh-pages#build-files (linked from
the home page as well). In short the -tpls version has default BS
templates bundled. In any case you should only include one of the
listed files. – Thanks pkozlowski.opensource

所以,js需要的ui-bootstrap-tpls.min.js ==(ui-bootstrap.min.js html模板)。如果你只包括ui-bootstrap.min.js,你还需要提供你自己的html模板。

否则你会看到类似:

GET http://localhost:8989/hello-world/template/tooltip/tooltip-popup.html 404 (Not Found) angular.js:7073
Error: [$compile:tpload] http://errors.angularjs.org/undefined/$compile/tpload?p0=template%2Ftooltip%2Ftooltip-popup.html
    at Error (<anonymous>)
    at http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:6:453
    at http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:54:14
    at http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:64:438
    at A (http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:89:258)
    at A (http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:89:258)
    at http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:90:465
    at g.$eval (http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:98:272)
    at g.$digest (http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:96:142)
    at g.$apply (http://localhost:8989/hello-world/js/vendor/angular-1.2.0-rc.3/angular.min.js:99:100)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读