I use TypeScript, wrote a certain file on class initialization + loading of initial parameters.
import PageContainer from './Page/pages'; import {Animation} from "./Page/pages"; export var pageContainer = new PageContainer('container', new Animation('', '')); pageContainer.select('Sign In'); Next, I collect this whole thing with a webpack and connect it like this in html:
<script src="../../out/bundle.js"></script> The question is how to make this pageContainer available in this html file? So that this code, for example: <a href="javascript: pageContainer.switch('Sign Up')">Register</a> could earn?