Search code examples
aureliamaterialize

Getting Aurelia-Materialize-Bridge to work with Aurelia 1.0


I've installed a fresh skeleton-navigation with typescript and tried to follow the instructions here: http://aurelia-ui-toolkits.github.io/demo-materialize/#/installation

When checking the network tabs and console windows, there are no errors however the styles do not seem to apply to the controls.


Solution

  • Be sure that when you're setting up the skeleton, you follow either the Aurelia tutorial or the Materialize Bridge tutorial. They outline how to do manual bootstrapping in different ways which don't play well with one another.

    In a nutshell, you either want to include the bootstrap script in your index.html file or you want to move that logic to your "main.js" file, not both. If you choose to go in the latter direction, you'll need to make sure that your HTML contains an import for "aurelia-bootstrappper" or the configure method of Main won't be run.