I need assistance creating a toggle feature for my angular app.
This is what I currently have:
<div ng-repeat='item in items'>
<div ng-click='toggle-{{item.number}} =!toggle-{{item.number}}>
<span>
<span>open</span> // Display 'open' text when the page is first loaded
<span>close</span> // Display 'close' text when the user clicks the div
</span>
</div>
</div>
I am seeking advice on how to toggle between the open
and close
spans based on user interaction. Any recommendations would be greatly appreciated. Thank you!