1
I saw in the documentation Angular that it is possible to recover data stored in the property date
(receiving an object) from a route
. I have, in this case an application with the following routes:
const routes: Routes = [
{
path: '',
component: UserComponent,
data: {
title: 'Home'
}
},
{
path: 'bank-accounts',
component: BankAccountsComponent,
data: {
title: 'Contas correntes'
}
},
];
How can I recover this data (the title in case) in a route?
then I take the property
sub
and dothis.sub.title
to recover the data, this?– Arthur Siqueira
To recover the Voce data you must store the variable v in an internal variable. I edited the response to give an alert showing the recovered value.
– Fonts