3.2 Setup
Last updated
Last updated
Most people like explanations in the context of doing what is just being explained. So let's do something very simple as the first step in showing how to use Materialize bridge. We will add several interesting pages rendering Materialize controls to the well known Aurelia Skeleton Navigation, a starter kit for building a standard navigation-style app with Aurelia.
Get it from here and use the Download ZIP method so we do not have to deal with Git issues in this simple context. After downloading this application, extract the contents of the folder named skeleton-esnext into the folder conveniently named skeleton-navigation-materialize
and use the instructions to build and run this app. Make sure that you already have the NodeJS, jspm and gulp installed, this application should be running after you execute
JSPM:
webpack:
and subsequently browse to http://localhost:9000, resulting with the following:
Image 1
Next, install aurelia-materialize-bridge as described in the installation instructions.
Now, we want to add four additional pages to this application. These pages will show Materialize select, button, slider and collapsible components:
Image 2 (collapsible shown rendered in its pop-out variant)
At this point verify that your main.js
class looks like this:
as this will ensure that the application we are about to augment from its original form, loads the Aurelia Materialize bridge (named bridge in the above code).
The next screenshot depicts the final UI for the application we are about to create, with four additional menubar items
Materialize select
Materialize button
Materialize slider
Materialize collapsible
Image 4 In order to clearly separate the added code from the original Aurelia Navigation Skeleton, the original project structure is changed to this:
Image 5
In the following articles you will fill the blue box.
As the last actions in this Setup section of the tutorial, you need to make the following changes, that are indicated in the Modified code section of Image 5 above
app.html
main.js
nav-bar.html