cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

Changing the number in label widget everytime the button is clicked

vivekse
14-Alexandrite

Changing the number in label widget everytime the button is clicked

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

ACCEPTED SOLUTION

Accepted Solutions
vivekse
14-Alexandrite
(To:vivekse)

Actually, I found the answer...

 

var x = 0;

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

View solution in original post

1 REPLY 1
vivekse
14-Alexandrite
(To:vivekse)

Actually, I found the answer...

 

var x = 0;

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

Announcements
Top Tags