Example
import { injectScriptToBody } from '@studyportals/microservice-injector'; injectScriptToBody('http://some-url.com/script.js') .then(() => { // Script is loaded });
The stylesheet is added to the body when the head is not available.
import { injectStyleSheetToHead } from '@studyportals/microservice-injector'; injectStyleSheetToHead('http://some-url.com/style.css') .then(() => { // Stylesheet is loaded });
Generated using TypeDoc
Example
import { injectScriptToBody } from '@studyportals/microservice-injector'; injectScriptToBody('http://some-url.com/script.js') .then(() => { // Script is loaded });