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
I have a model with 2 sequences. Right now I switch between the sequences via a 2D select widget.
What I am trying to achieve is that if a choose one of the sequences a popup with a text will be visible and switching back to the first sequence the popup will disappear.
I have tried different variations with no success and hope someone can help with see whats wrong. At first I have this code snippet:
$scope.$on("$ionicView.afterEnter", function(event) {
$scope.app.view.Home.wdg['select-1'].value = 'l-Creo 3D - Standard View.pvi'
});
This to set which view is selected to begin with, also this is the view that I want no visible popup.
Then I have this code snippet which follows and make the function "sequencemode":
$scope.sequencemode = function(){
if($scope.app.view.Home.wdg['select-1'].value = 'l-Creo 3D - Standard View.pvi'){
$scope.app.view.Home.wdg['popup-1'].visible = false;
}
else{
$scope.app.view.Home.wdg['popup-1'].visible = true;
}
}
The idea is that it is a "if statement" which says that if the select widget has the value of which it starts with "standard view" the popup will be false, then if it has another value the popup will show.
This function I added in at "valuechange" in the property for a sequencelist. Meaning every time you change value in the select list this function should be starting.
However what happens is that if I have this code active in home.js I am not able to even change the value in the list.
I wonder if someone has made something similiar?
Best regards,
Philip Bengtsson
Solved! Go to Solution.
Ok,
This one got solved pretty easy after some asking around. apparently if one rewrite the if statement like this:
if($scope.app.view.Home.wdg['select-1'].value == 'l-Creo 3D - Standard View.pvi')
Meaning that you have double equal signs "==" the if statement worked and the rest of the code aswell.
This one got resolved!
Ok,
This one got solved pretty easy after some asking around. apparently if one rewrite the if statement like this:
if($scope.app.view.Home.wdg['select-1'].value == 'l-Creo 3D - Standard View.pvi')
Meaning that you have double equal signs "==" the if statement worked and the rest of the code aswell.
This one got resolved!