Presented here is a button that serves as a toggle switch:
<button ng-click="togglefunction()">Toggle Data</button>
Below is the toggle functionality:
$scope.toggleToolPanel = function () {
// The goal is to include the following 2 functions so that on the first click, function1 executes, and on subsequent clicks, function2 executes.
};
These are the two functions that will run alternatively within the toggleFunction:
function function1(params) {
return '<span >' + data + '</span>';
}
function function2(params) {
return '<span >' + data *100 + '</span>';
}