Is there a better way to exchange FILEURL with JS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Is there a better way to exchange FILEURL with JS
Is there a better way to exchange FILEURL with JS?
I was able to change it by creating a global variable and linking it to the file url path, but I wonder if there is a more optimized way?
Solved! Go to Solution.
- Labels:
-
Coding
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Binding to an app param is good and can help if you are having UI update issues. Using app.param is a useful approach.
Going forward I have started using
$scope.setWidgetProp("Your widget name" , "attribute name" , value)
and
$scope.getWidgetProp ("Your widget name" , "attribute name")
as opposed tp
$scope.view.wdg["Text-1].text = "some text";
The set and get are higher functions and do additional work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could do setWidgetProp but am unsure of the use model below shows the syntax where src is the property name
$scope.setWidgetProp("YourWidgetStudioID", "src", "app/resources/Uploaded/Procedimento1.PNG");
Maybe we need a little more info on what your are trying to achieve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am changing the fileurl of a 2D "File" widget according to the switch case, as I am currently doing it is working and it works with a global variable linked in the fileurl, but I wonder if there is any other way to conform to good usage practices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Binding to an app param is good and can help if you are having UI update issues. Using app.param is a useful approach.
Going forward I have started using
$scope.setWidgetProp("Your widget name" , "attribute name" , value)
and
$scope.getWidgetProp ("Your widget name" , "attribute name")
as opposed tp
$scope.view.wdg["Text-1].text = "some text";
The set and get are higher functions and do additional work
