cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Where do I learn about scope?

CHASEONHO
18-Opal

Where do I learn about scope?

You can use the scope in ThingWorx Studio to modify the properties of a widget or the parameters of an application.

 

For example, to modify the value of a variable called value through js:
$ scope.app.params.value = "";
For a widget it looks like this:
  $ scope.app.fn.triggerWidgetService ('popup-1', 'showpopup');
  $ scope.view.wdg ['model-1'] ['sequence'] = "";

 

Where do I check for the app that I call after scope, or something like view, fn, wdg?


If you have a tutorial on which class or function should appear when using scope, please share it.

 

 

thankㄴ

1 REPLY 1
dupatel
19-Tanzanite
(To:CHASEONHO)

@CHASEONHO $scope is the application object (the owner of application variables and functions).
JavaScript has two scopes – global and local. Any variable declared outside of a function belongs to the global scope, and is therefore accessible from anywhere in your code. Each function has its own scope, and any variable declared within that function is only accessible from that function and any nested functions.

Scope is something generic and I believe we do not have a list or documentation on the request.

-Durgesh

Announcements

Top Tags