我在控制檯中沒有錯誤。但控制檯沒有記錄我放入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!有一天我會像你一樣棒! –