Extending Functionality in Vuforia Studio with Code > Using JavaScript in Vuforia Studio
Using JavaScript in Vuforia Studio
Including custom JavaScript in your experiences can introduce security risks. When linking or binding to dynamic content, make sure to use only trusted sources, and we suggest that you add relevant checks where any such values will be entered by users. Do not preview or publish projects that contain scripts from untrusted sources, and when writing custom JavaScript, be sure to follow secure coding practices and testing. As an example, see the AJAX Security Cheat Sheet.
The JavaScript editor allows you to use your own code within the application view as the body of the AngularJS controller for the view. Therefore, it has access to a few objects that are implicitly available, such as the $scope. This allows functions and properties, like button click events, to be exposed for the widgets to use. To access the editor, click Home.js under the VIEWS section.
Invoke Functions from a Button
Translate Models and Model Items
Use a Timer
Show and Hide a Spinner
Link to Remote Media
Create an Experience with Dynamic Model Loading
Open an Experience from within Another Experience
Show or Hide the View Navigation Menu
Obtain Project Information from the metadata.json File
Additional Resources
Here are a few other useful links for JS and Angular JS documentation:
Angular JS