I have a button which has an routerlink.
On the "routedpage" there is an enum which decides what will be loaded on the page.
I like to send a param with the button so I can use it on the routed page.
<a routerLink="/all-countries">List of coutries</a>
I tried the activatedroute option but that needs a string in the url.
const name: string = this.route.snapshot.paramMap.get('somestring_but_need_an_enum');
is it not possible to send an @output when clicked on the button and use this on the routed page as an @Input.
If this is not the right method which method should I use.
Route module contains the following routes:
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'detail/:name', component: CountryDetailComponent },
{ path: 'all-countries', component: AllCountriesComponent }
];