我在控制台中没有错误。但控制台没有记录我放入top-nav.js
的构造函数的console.log
。但更重要的是。简单的jumbotron div不是渲染,Aurelia在控制台中说它找到了正确的top-nav.html
。这里是App.html
Aurelia要求html导入不起作用
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from="htmlreq/top-nav"></require>
<h1>${message}</h1>
</template>
App.js
一致性
export class App {
message = "Hello Pathways";
}
top-nav.html
<template>
<div class="jumbotron">
<div class="container">
<p>Career & Technical Education </p>
</div>
</div>
</template>
top-nav.js
控制台语句不点火。 Jumbotron在dom的任何地方都是不可见的。
export class TopNav {
_topnav = true;
constructor() {
console.log('constructed');
}
}
一如既往,法比奥与真棒的答案! –
哈哈,谢谢@AshleyGrant!有一天我会像你一样棒! –