Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Dear PTC community,
Please advise how I can link multiple buttons within one project A to multiple Views within another project B.
When I put my code for multiple buttons/labels(within project A) linked to multiple views ( within project B) all buttons drive me to the same last in a code View. It looks like Project A for some reason ignores code for the previous Views and sees only the last one( "RemovingRVcoil")
// $scope, $element, $attrs, $injector, $sce, $timeout, $http, $ionicPopup, and $ionicPopover services are available
//url of the deepLink of Project B
$scope.UriTest='h--------------------
..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheCabinet"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.Removingcabinet=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}
//url of the deepLink of Project B
$scope.UriTest='h--------------------
..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheInverter"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.Removingtheinverterassembly=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}
//url of the deepLink of Project B
$scope.UriTest='hh--------------------
..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheinverterPC"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.RemovingInverterassemblyPCB=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}
//url of the deepLink of Project B
$scope.UriTest='h--------------------
.thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheRVcoil"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.RemovingRVcoil=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}
Take a look at the 2 projects and colleague provided
MenuA is the start point and
viewlistB is the arrival
MenuA has a function below - you can see that pattern - try it out
$scope.navto = function(x) {
//
// alter the expId variable by specifying the id number (see the experiences list for the other app)
var dest = "https://view.vuforia.com/command/view-experience?url=http://pp-2301110001kp.portal.ptc.io%2FExperienceService%2Fcontent%2Fprojects%2Fviewlistb%2Findex.html%3FexpId%3D" + x;
// and navigate to this experience
window.location.href = dest;
}