Aurelia-CLI (require)
First of all, webpack is highly recommended.
Scaffolding the app
Make sure you have at least version 0.34.0 of Aurelia-CLI installed.
$ au newChoose Aurelia options as you see fit. In the last step, choose to install all dependencies.
Getting the plugin
In your project install the following via CLI (execution order matters!):
$ au install aurelia-validation
$ au install aurelia-typed-observable-plugin
$ au install tslib
$ au install materialize-css@next
$ au install aurelia-materialize-bridgeConfigure your app
For Material Design icons include this in your
index.htmlhead section:<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">Add this to
main.jsin yoursrcfolder:aurelia.use.plugin('aurelia-materialize-bridge', b => b.useAll().preventWavesAttach());Note: The above shows how to use all available controls at once. If you choose to pick which you'd like to use, you can
usesingle components like this:.plugin('aurelia-materialize-bridge', bridge => { bridge .useButton() .useCollapsible() .useModal() .useTabs() .useWaves().preventWavesAttach(); });At the end of this page is a full list of currently available options. Important:
preventWavesAttachis only needed with CLI to prevent dimmed buttons. See this issue for details.Add this to your
app.html<require from="materialize-css/dist/css/materialize.css"></require>Update
aurelia.jsonfor the typed plugin. The following should already be present independenciesfor thevendor-bundle, inbundlessection, just needs a little tweak. If not there you can just add it.{ "name": "aurelia-typed-observable-plugin", "path": "../node_modules/aurelia-typed-observable-plugin/dist/amd", "main": "index" },
You are done!
It is now possible to drop some custom-elements into your DOM. See the other pages on this website for detailed information on how to do this.
Now you might want to do our app developers tutorial, based on Aurelia Skeleton navigation.
As described above, here is a full list of available options:
aurelia.use.plugin('aurelia-materialize-bridge', bridge => {
bridge
.useAutoComplete()
.useBadge()
.useBox()
.useBreadcrumbs()
.useButton()
.useAutoButtonWaves(true)
.useCard()
.useCarousel()
.useCharacterCounter()
.useCheckbox()
.useChip()
.useCollapsible()
.useCollection()
.useColors()
.useDatePicker()
.useDropdown()
.useFab()
.useFile()
.useFooter()
.useInput()
.useLookup()
.useModal()
.useNavbar()
.usePagination()
.useParallax()
.useProgress()
.usePushpin()
.useRadio()
.useRange()
.useScrollSpy()
.useSelect()
.useSidenav()
.useSlider()
.useSwitch()
.useTabs()
.useTapTarget()
.useTimePicker()
.useTooltip()
.useWaitCursor()
.useWaves()
.useWell();
});Last updated