0

I have to do some tabs with ui.bootstrap in a web application. I want to choose a template for each tab, but it doesn't work. Why? This the tabs.html:

<uib-tabset active="activeForm">
  <uib-tab index="0" heading="One" templateUrl="one.html"></uib-tab>
  <uib-tab index="1" heading="Two" templateUrl="two.html"></uib-tab>
</uib-tabset>

Both 'one.html' and 'two.html' are in the same directory of 'tabs.html'. P.S. it doesn't give me a error, simply it doesn't show me the template

panagulis72
  • 2,129
  • 6
  • 31
  • 71

1 Answers1

0

You should be using template-url="one.html".

Vaelyr
  • 2,841
  • 2
  • 21
  • 34
  • Then your template is not defined properly. Can you post the content of your tab template here? – Vaelyr Apr 28 '16 at 20:53
  • Well it cannot work. There is no click handler, no styles, no any directives or bindings for the data. Take a look at the default template for reference: https://github.com/angular-ui/bootstrap/blob/master/template/tabs/tab.html – Vaelyr Apr 28 '16 at 21:01
  • 1
    Just to add to this, make sure you are using a recent version of angular-ui-bootstrap. I was struggling with this very issue and I was using 1.1.1; looking at the changelog, the `template-url` attribute looks to have been added in version 1.2.0. – tylerwal Jul 19 '16 at 17:57