Reputation: 28086
Folks,
I am trying to implement a vertical navbar in my page. This page will be rendered by Angular. Somehow I am not able to get this to working. not sure what I am missing here.
Clicking on different tabs does not display their respective pages.
Any clues anyone can provide will be greatly appreciated.
here is a plnkr I have created for troubleshooting: http://plnkr.co/edit/dzfv8VMWCJk8cywgy5mm
Upvotes: 2
Views: 18173
Reputation: 3952
You need to dynamically set the classes of elements under nav-tabs
and tab-content
. The easiest way to accomplish this is to use ng-class
attribute that calls a function in your controller to return appropriate class for each tab. To set the active tab, use ng-click
on the nav-tabs
.
Here is a working version in Plunker: http://plnkr.co/edit/UBBq7V8mdyqllBHdwegY
Upvotes: 6