i need to add a param to the route tabset component in ngx-admin nebular and angular 5 as follow:
tabs: any[] = [
{
title: 'My tab 1',
route: '/pages/projects/edit/tab1/:id',
}...
]
Is there a way to do it?
Thanks in advance
Here is the solution I am currently using.
tabs: any[];
async ngOnInit() {
const id = await getIdLogic();
this.tabs = [
{
title: 'Tab 1',
route: `.../.../${id}`
},
...
]
}
And then in you HTML you need to remember to only render the nb-route-tabset component once the tabs have been set.
<nb-route-tabset *ngIf="tabs" [tabs]="tabs"></nb-route-tabset>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With