angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

Tab content as a templateUrl

Open Urigo opened this issue 13 years ago • 5 comments

It will be extremely helpful if the tab content could serve a template by it's url. just like routing does. Thanks!

Urigo avatar Jul 23 '13 10:07 Urigo

+1

AngularUI does it but not completely (ie. it is not possible to specify a controller). Using the same kind of declaration as routing (as proposed by Urigo) is a good option I think.

Something like :

tab-controller.js

$scope.tabs = [
    { title: "Tab 1", templateUrl: '/assets/partial/tab1.htm', controller: Tab1Ctrl, active: true },
    { title: "Tab 2", templateUrl: '/assets/partial/tab2.htm', controller: Tab2Ctrl },
    { title: "Tab 3", templateUrl: '/assets/partial/tab3.htm', controller: Tab3Ctrl },
]

page.htm

<div bs-tabs="tabs"></div>

adericbourg avatar Sep 28 '13 12:09 adericbourg

+1 I also would like to be able to specify temlateUrl and controller for tabs

merdisheva avatar Oct 07 '13 16:10 merdisheva

The AngularStrapv2.0.0-beta.1 has been released with a new version of this plugin. The former version is now both deprecated and unsupported.

Please try to reproduce your issue against the master branch.

Thanks!

mgcrea avatar Jan 08 '14 10:01 mgcrea

Hi, how is the the new version 2 is supporting template url? there is no example in docs. i tried to:

<div ng-repeat="tab in tabs" data-title="{{::tab.title}}" template="tab.template" bs-pane>

where the tab.template is a url to an html file, but nothing shows in the tab content. if I use ng-include instead it works but the order of the tabs is not preserved.

eran

eranaorato avatar Oct 02 '14 12:10 eranaorato

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 17:01 lock[bot]