gpt4 book ai didi

angularjs - ui-bootstrap-tpls.min.js 和 ui-bootstrap.min.js 有什么区别?

转载 作者:行者123 更新时间:2023-12-03 04:11:14 25 4
gpt4 key购买 nike

Angular-UI-Bootstrap page在 cdnjs 上,是这样说的:

Twitter Bootstrap 的原生 AngularJS (Angular) 指令。占用空间小(压缩后 5 kB!),无需第三方 JavaScript 依赖项(jQuery、Bootstrap JavaScript)!

...并有选项

//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 customizedtemplates.

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

最佳答案

因此,JavaScript 代码需要 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)

关于angularjs - ui-bootstrap-tpls.min.js 和 ui-bootstrap.min.js 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19820625/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com