import ChildOrder from './child.html?raw';
export default function childModule() {
return {
welcome: 'Child Order Module Inited',
view: ChildOrder,
init() {
// Prints "Child Order Module Inited" twice
console.log(this.welcome);
this.$root.innerHTML = this.view;
}
};
};
The childModule init method runs twice. Maybe I'm missing something because if I move the childModule to HomeModule (where the OrderModule is) it will only run once.
If not missing anything then I think each module runs one time per child level (third-level nesting will run 3 times)
Hi, I don't know if missing something but here's the scenario:
The
orderModule
component loads perfectly. But then ...The childModule
init
method runs twice. Maybe I'm missing something because if I move thechildModule
toHomeModule
(where theOrderModule
is) it will only run once.If not missing anything then I think each module runs one time per child level (third-level nesting will run 3 times)