Get started
This is a good starting point also for visual designers who prefer to work in HTML, because the script will inject the stylesheet along with the fonts and icons etc.
UI components are initialized on the DOMContentLoaded
event, but this might change some day. To make sure that all the components are initialized before you do something to them, you can wrap your code in a callback like this.
- Before
DOMContentLoaded
the callback will be executed later. - After
DOMContentLoaded
the callback will execute immedeately.
You can perhaps make it easier for yourself by kickstarting your app with a ts.ui.ready
callback, because then you wont't have to worry about it later on.
Before we begin, you'll need to mark up your page with the basic layout.