Creating the Files
In the components
folder create three Custom Elements:
components/MenuPage.js
export default class MenuPage extends HTMLElement {
constructor() {
super();
}
}
customElements.define("menu-page", DetailsPage);
components/DetailsPage.js
export default class DetailsPage extends HTMLElement {
constructor() {
super();
}
}
customElements.define("details-page", DetailsPage);
components/OrderPage.js
export default class OrderPage extends HTMLElement {
constructor() {
super();
}
}
customElements.define("order-page", DetailsPage);