Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Setting the active tab fails if an inline expression is set in the active attribute #1617

Closed
munsellj opened this issue Jan 19, 2014 · 4 comments

Comments

@munsellj
Copy link

Inline expressions should be allowed to set the active tab.

Example:
http://plnkr.co/8099ELlVC7f9ck63gYaV

@mvhecke
Copy link
Contributor

mvhecke commented Jan 19, 2014

This is because it tries to process what you put into the active attribute and it expects it to be boolean, but in your case there is no boolean so it fails. What is it you exactly what you're trying to accomplish through this kind of expression?

@mvhecke
Copy link
Contributor

mvhecke commented Jan 19, 2014

After searching a bit, it seems this is a duplicate of #1539.

munsellj pushed a commit to munsellj/bootstrap that referenced this issue Jan 19, 2014
@munsellj
Copy link
Author

Yeah that looks like the same issue and the PR mentioned there should fix this in my case as well. I also submitted a PR as well (#1618).

The use case were I encountered this was comparing the route name stored as a scope variable (using Angular UI Router) to a string for each tab to set the active tab based on the current route(each tab has an associated route). I worked around the issue by using scope variables instead of an inline expression but I think either should be acceptable.

@rvanbaalen
Copy link
Contributor

Continuing in #1496

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants