Reputation: 647
I am trying to run aurelia cli for the first time. I got everything working save for the router view. I keep getting the error
Uncaught TypeError: plugin.load is not a function
at Module...
here are my files:
main.js
import environment from './environment';
//Configure Bluebird Promises.
Promise.config({
warnings: {
wForgottenReturn: false
}
});
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.feature('resources');
if (environment.debug) {
aurelia.use.developmentLogging();
}
if (environment.testing) {
aurelia.use.plugin('aurelia-testing');
}
aurelia.start().then(() => aurelia.setRoot());
}
app.html
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<router-view></router-view>
</template>
app.js
export class App {
configureRouter(config, router){
this.router = router;
config.title = 'Aurelia';
config.map([
{ route: '', name: 'default', moduleId: 'default', nav: false, title: 'Default' }
]);
}
}
default.html
<template>
${test}
</template>
default.js
export class DefaultApp {
constructor(){
this.test = 'TEST!';
}
}
index.html
<!DOCTYPE html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<script src="scripts/vendor-bundle.js" data-main="aurelia-bootstrapper"></script>
</body>
</html>
Any ideas as to why I keep getting this error?
Upvotes: 2
Views: 911
Reputation: 647
The issue I had was that I had the default.html file inside a folder instead of next to the default.js. Once moved, it all worked.
Upvotes: 1