Ignoring the “require” issue for a moment, it is possible to load those js files as modules. This is perhaps not the best way to do things but something like this should work in your On Start function:
The JQuery statement will add this script tag after the div indicated which works ok in my simple spinner/animate example which I based on this example:
Probably there is a better way to do this, but this is a hastily thrown together example where I downloaded the spinner project, did a “ng build” and uploaded a css files then the three js files to vantiq docs and added the js script tags as modules this way, and added the angular tags via html widget and all seems to work ok.
Ignoring the “require” issue for a moment, it is possible to load those js files as modules. This is perhaps not the best way to do things but something like this should work in your On Start function:
var js1 = client.getDocumentUrl(“js/spinner/main.37a49f446d681eeb.js”);
var js2 = client.getDocumentUrl(“js/spinner/polyfills.404f052401b84023.js”);
var js3 = client.getDocumentUrl(“js/spinner/runtime.bccb4d0cf34bf784.js”);
$(“#spinner”).last().after(“<script type=’module’ src='” + js1 + “‘>”);
$(“#spinner”).last().after(“<script type=’module’ src='” + js2 + “‘>”);
$(“#spinner”).last().after(“<script type=’module’ src='” + js3 + “‘>”);
The JQuery statement will add this script tag after the div indicated which works ok in my simple spinner/animate example which I based on this example:
https://material.angular.io/components/progress-spinner/overview
Probably there is a better way to do this, but this is a hastily thrown together example where I downloaded the spinner project, did a “ng build” and uploaded a css files then the three js files to vantiq docs and added the js script tags as modules this way, and added the angular tags via html widget and all seems to work ok.