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:
customer.js:
parentWindow()
{
window.open(this.router.generate('customer',
{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