angular/angular.js — pull request #1770 by viilaismonster (2013-01-08 08:01:36+00:00)
Title: fix(bootstrap): bug of tabbable viewValue unexpected change

move the tabbable un-active code into the check loop to make sure the new viewValue is in the tabs list

I work with angularJs & angular-ui/bootstrap
in one case i want to use tab inside a popmodal, but the popmodal cannot select anyone
event I write code to change the value of ngModel viewValue

I thought it might be caught by something wrong inside angular-ui,
and also the code in src/bootstrap/bootstrap.js is not reasonable

I think the code for un-active a tab should be run when a new, exist tab is select.

here is the plnkr
http://plnkr.co/edit/IIYvIYTMeCzDQZlOPxWm