2
我想第一次運行aurelia cli。除了路由器視圖,我還有一切工作。我不斷收到錯誤aurelia plugin.load不是函數錯誤
Uncaught TypeError: plugin.load is not a function
at Module...
這裏有我的文件:
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>
任何想法,爲什麼我一直得到這個錯誤?
請發佈您的index.html。 –
更新爲包含index.html – seroth
問題已解決見下文 – seroth