App configuration and startup
Application Startup
Quick startup
import { RouterConfiguration } from '@aurelia/router';
import Aurelia, { StyleConfiguration } from 'aurelia';
import { MyRootComponent } from './my-root-component';
// By default host to element name (<my-root-component> for MyRootComponent),
// or <body> if <my-root-component> is absent.
Aurelia.app(MyRootComponent).start();
// Or load additional Aurelia features
Aurelia
.register(
RouterConfiguration.customize({ useUrlFragmentHash: false })
)
.app(MyRootComponent)
.start();
// Or host to <my-start-tag>
Aurelia
.register(
RouterConfiguration.customize({ useUrlFragmentHash: false })
)
.app({
component: MyRootComponent,
host: document.querySelector('my-start-tag')
})
.start();Verbose Startup
Register a globally available custom element
Registering a single element
Register a set of elements
Last updated
Was this helpful?