Hello
How do i get back from the experince to the library with a command. I found the command $scope.goToLibrary(); but it doesn't work. I know that i get back to the scan process with a voice command, but i want to get back with a button press.
Can someone help me please, thanks in advance
It appears like you are on the right track by pressing a button to return to the Vuforia Studio library. The command $scope.goToLibrary(); should work.
This should link the $scope.goToLibrary(); function to the button push, allowing you to return to the library whenever the button is hit.
Invoke Functions from a Button -https://support.ptc.com/help/vuforia/studio/en/index.html#page/Studio_Help_Center/Beginner_JSInvokeFunction.html
Is this helpful in resolving your issue?
Hi,
Firstly thanks for your answer.
I have already tried that command via function in the javascript function and linking the button to it, but this way it doesn't work.
Have I to implement directly into the button to make it work, or can i use the javascript command section and use it via function?
Hi @JS_10688265 ,
for me that function will be new. What I know is e.g. the $scope.app.fn.navigateToScanMode().
Where did you find that function?
So printing the scope e.g. :
///////////////////////////////////////////
angular.element(document).ready(function() { console.warn($scope);})
///////////////////////////////////////////
and then in preview checked in the Cntrl+Shift+I debuging console check the $scope but the printing does not contain such function :
also checked the $scope.app.fn object
here also could not find any function with that name by default function of eyewear project.
Ok when I define a function e.g.
$scope.goToLibrary = ()=>{
//... you go2library definition here
};
then you will find that in the $sope object.
Are there any specific extension installed. Possibly function is defined by extension or by some loaded javascript module?
Also,could you check, please, your Home.js or any <view_name>.js - in the project where you find that function if there is a javaScript defintion of that. It will be interresting what that defintion implement. Thanks