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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Make widget appear once tracking acquired

micah
12-Amethyst

Make widget appear once tracking acquired

I'm trying to make widgets appear once initial tracking is acquired.

I tried using the below code but it doesn't seem to work.

$scope.$on('tracking', function()
          {
    $scope.view.wdg['label-2']['visible'] = true;
})

 What service do I need to use to make it work?

1 REPLY 1

I would suggest to use some thing like this:

 

 

$scope.$on('tracking', function() 
{ //$scope.view.wdg['label-2']['visible'] = true; 
$scope.setWidgetProp('label-2','visible',true);
$scope.$applyAsync();
})

 

another poinit is to check if the tracking event fired  e.g. via snackbar message on mobile device: 

 


$scope.$on('tracking', function() 
{ 
$timeout(twx.app.fn.addSnackbarMessage("tracking Event fired","twLogo"),200);
$scope.setWidgetProp('label-2','visible',true);
$scope.$applyAsync();
})

 

 

 

Top Tags