ui-bootstrap-tpls.min.js と ui-bootstrap.min.js の違いは何ですか? 質問する

ui-bootstrap-tpls.min.js と ui-bootstrap.min.js の違いは何ですか? 質問する

Angular-UI-Bootstrap ページcdnjs では、次のように書かれています:

Twitter の Bootstrap 用のネイティブ AngularJS (Angular) ディレクティブ。フットプリントが小さく (gzip 圧縮で 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

これらを比較すると微妙な違いが分かりますが、それに関するドキュメントは見つからないようです...

簡単に言うと、カスタマイズされたテンプレートを作成する場合を除き、tpls を使用します。

ここに文書化されています: github.com/angular-ui/bootstrap/tree/gh-pages#build-files (ホームページからもリンクされています)。簡単に言うと、-tpls バージョンにはデフォルトの Bootstrap テンプレートがバンドルされています。いずれの場合も、リストされているファイルのうち 1 つだけを含める必要があります。 - ありがとう、pkozlowski.opensource

ベストアンサー1

それで、ui-bootstrap-tpls.min.js == (ui-bootstrap.min.js + HTML テンプレート)JavaScript コードで必要です。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)

おすすめ記事