public/myjs.js
export function show() {
console.log("Hello");
}
app/components/main-page.js
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { show } from "../../public/myjs";
export default class MainPageComponent extends Component {
@action
helper() {
show();
}
}
app/components/main-page.hbs
<button type="button" {{on "click" this.helper}}>say hello</button>
My question is how to call the function show from main-page.js? It is showing the error like no module found in the name of myjs.js