This FAQ applies to the Reactive Web Apps only.
Follow these steps to set the favicon in your Reactive Web Apps. You need to do two things in Service Studio:
- Add the favicon to the app resources
- Load the favicon when the Module loads
In this example we're using favicon.ico. You should edit the Java Script if you're using a different file name.
- Go to the Data tab > Resources > Import resource and select your favicon.ico file. A dialog shows.
- In the Add Resource dialog window click Add as resource. The image is added as a resource and you can set other options.
- Set the Deploy Action property of the favicon resource to Deploy to Target Directory.
- Go to the Logic tab > right-click the Client Action folder > open the Add System Event menu > click On Application Ready. The logic of this new Action opens.
var link = document.createElement('link'); link.rel = 'icon'; link.href = 'favicon.ico'; var head = document.querySelector('head'); head.appendChild(link);
Publish and open your app in a browser.