Attempting to generate a route for a new tab to open

I have a need to open a new tab in certain instances, and I found this topic on github that appeared to address it, but I am having trouble getting it to work.

Topic: so-arelia-navigation-test/app.ts at master · martonsagi/so-arelia-navigation-test · GitHub

here’s my app.js setup of the routes:

        route: 'customer/:debtor_id?/:inv_num?', 
        name: 'customer', 
        moduleId: PLATFORM.moduleName('customer'), 
        nav: true, 
        href: 'customer',
        title: 'Customer',
        //activationStrategy: activationStrategy.invokeLifecycle,

here’s the code I’m calling to try to open the new tab:


                {debtor_id: this.dbtr.parent_customer_number}), '_blank');

The error I am getting appears to be a generic:

aurelia-logging-console.js ERROR [app-router] TypeError: Cannot read property 'match' of undefined

1 Like


Even when I build the route as so:

<a route-href="route: 'customer'; params.bind: {debtor_id: dbtr.parent_customer_number}">

I still get the same error:

aurelia-logging-console.js?dc89:45 ERROR [app-router] TypeError: Cannot read property 'match' of undefined

1 Like

Maybe copy the stack trace of the error, so other can help look into it? It’s hard to guess with just the message sometimes