To showcase the problem I'm facing, please refer to this link: http://codepen.io/pietrofxq/pen/ZLLJdr?editors=1010
Click on "remove tabs" and then on "add tab"
The challenge at hand involves using a loop with ng-repeat
to display tabs. At times, there may be no items in the array, but when one tab is added back, it should automatically be selected since it's the only tab present in the tabs array. Currently, the behavior requires clicking on the tab for Angular to recognize that it's selected. How can I ensure that the tab is selected upon addition to the array without needing a click?