簡體   English   中英

使用角度ui引導程序顯示選項卡-選項卡集

[英]Display tabs using angular ui bootstrap - tabsets

我正在嘗試使用angular ui創建引導程序選項卡。 但是選項卡的內容不會一次顯示。 而且標簽之類的按鈕不可見。

Jsfiddle是@ http://jsfiddle.net/qn8vcjwo/2/

標簽集代碼是,

<tabset>
  <tab heading="title one">this is tab number one</tab>
  <tab heading="title two">this is tab number two</tab>
  <tab heading="title three">this is tab number three</tab>
</tabset>

而且,我得到的錯誤是,

Failed to instantiate module app due to:
Error: [$injector:nomod] Module 'app' is not available

您需要將“框架和擴展”下的“ onLoad”設置更改為“無包裝”。 這會將您的代碼放在head而不是在onLoad事件上運行它。 請參閱jsfiddle docs Angular嘗試在DOMContentLoaded事件上自動初始化您的應用程序,但是尚未定義您的應用程序,因為還沒有觸發onLoad ,這就是為什么您遇到錯誤。

更新時,還有另一個問題。 您已經包含了UI Bootstrap庫,但是該版本不包含默認模板。 由於您當前未定義自定義模板,因此應在模板中包含庫。 只需使用模板隨附的URL即可:

https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.3/ui-bootstrap-tpls.js

如有需要, 在這里工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM