Skip to main content
1-Visitor
January 25, 2020
Solved

Changing the number in label widget everytime the button is clicked

  • January 25, 2020
  • 1 reply
  • 944 views

I want to increase the number by 1 inside the label every time a button is clicked. Any help would be appreciated.

Best answer by vivekse

Actually, I found the answer...

 

var x = 0;

$scope. click = function(){
x = x +1
$scope.setWidgetProp( "label-1", "text", x); };

1 reply

vivekse1-VisitorAuthorAnswer
1-Visitor
January 25, 2020

Actually, I found the answer...

 

var x = 0;

$scope. click = function(){
x = x +1
$scope.setWidgetProp( "label-1", "text", x); };