Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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?
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();
})