How do you get a custom element to load using Aurelia -
i have custom element nav-bar in skeleton-navigation except not using router part. can't seem fire events.
code: nav-bar.html
<template> <ul id="topmenu"></ul> </template>
nav-bar.js
attached() { alert('test') }
containing page:
<template> <require from="./nav-bar.html"></require> <div class="desktop" id="container"> <nav-bar></nav-bar> </div> </template>
when load custom element using .html
@ end of path, aurelia not load .js
file. change require element following, , work expect:
<require from="./nav-bar"></require>
Comments
Post a Comment