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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Make widget appear once tracking acquired

micah
14-Alexandrite

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();
})

 

 

 

Announcements

Top Tags