Child router in custom element

筅森魡賤 提交于 2019-12-12 03:45:21

问题


I am trying to add a router to a custom element. The element should have two subviews where user can switch between them. However, I have run into a problem:

export class customElement {
   configureRouter(config,router) { ... } //this is not getting called
}

This question is related and an answer to the question states that "It will not work if it is a custom element."

Is there a workaround or is this just not possible?


回答1:


This is not possible. Custom elements are not the same as routed view-models. And Aurelia offers no way you can easily achieve this with a custom element.



来源:https://stackoverflow.com/questions/39569853/child-router-in-custom-element

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!