0

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?

Community
  • 1
  • 1
Ivan Bacher
  • 5,855
  • 9
  • 36
  • 56

1 Answers1

4

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.

Dwayne Charrington
  • 6,524
  • 7
  • 41
  • 63