Seems simple enough... my app.module looks like this:
const appRoutes: Routes = [
{ path: '', component: AppComponent },
{ path: ':config', component: AppComponent }
];
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
RouterModule.forRoot(appRoutes)
],
providers: [],
bootstrap: [AppComponent]
})
and the app.component code looks like this:
constructor(private route: ActivatedRoute) {
}
config: string;
ngOnInit() {
this.config = this.route.snapshot.params['config'];
}
I want to be able to do something like hit http://localhost:4200/english and have the config property set to 'english'... but this.route.snapshot.params['config'] is undefined every time.
Any help appreciated.

this.route.params.subscribe(params => { this.config =params['config']})