I'm pulling through a json file into my Ionic/Angular html file. I have transformed some lines of text into a button.
My plan is that when the user clicks the button, the html of that button is passed as an argument to the 'ng-click' function (on the button).
But I'm struggling to do this - despite Google/SO searches/reading through Angular docs.
My HTML for the two buttons is:
<p><span class="button button-positive button-small" ng-click=personalBest()>{{workout[0].box.cfhackney.daily[0].strength.exercise[0].movement.type[0]}}</span></p>
When the file is run on the local server, the HTML text for the above button is "Deadlift"
<p><span class="button button-positive button-small button-text" ng-click=personalBest()> {{workout[0].box.cfhackney.daily[0].strength.exercise[0].movement.type[1]}}</p>
When the file is run on the local server, the HTML text in the above button is "Squat"
I'ld like both Deadlift and Squat to be passed as arguments to the 'ng-click=personalBest()' function on the buttons.
How can I do this?
My github reference is https://github.com/elinnet/protocf (the html file is located at testapp/www/templates/tab-wod.html)
Many thanks.