- If the answers do not fully address your question, please ask a new question .
- On first load, one of the headings appear ‘active` as set.
I am trying to make HTML headings active/inactive based on active variable. But to set the active flag on clicking the heading, I am using the $index variable of ng-repeat directive:
@ng_real_ninja: apply CSS class on HTML element inside ng-repeat based on condition #angularjs #reactjs
On first load, one of the headings appear ‘active` as set. But on subsequent clicks, it does not give the desired results. All the headings become active on clicking them. Here is the fiddle.
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.