Docs /  getting started

First TroopJS App

Now that you've successfully installed TroopJS, let's start by creating a simple application.

  • Let's create a widget called app/kickoff, a troopjs-dom/component/widget started by the application. It will render some greeting text that's declared as the data-weave attribute on the body element.

  • We then bootstrap the application by creating a troopjs-dom/application/widget component that lives on the top-level page element (html element). This widget will be responsible for weaving all page components such as the above app/kickoff one.

You're off to a great start when you see that the welcome message indicates that TroopJS has bootstrapped successfully when you load the page.

Find an error? Let us know →