Programmatically selecting a tab with angularjs and bootstrapui

Let’s say you want to programmatically select a tab with angularjs and bootstrap ui:

[CODE MISSING]

According to the documentation for 3.1.1 it should be enough to modify the model; here controller.tabUsers or controller.tabGroups. Only: it doesn’t work. We’ll never know why.

The way out is simulating the click with jquery:

$("#tab_users a").trigger("click");

2 thoughts on “Programmatically selecting a tab with angularjs and bootstrapui

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.