In your tsconfig.json
"compileOnSave": true, // change it to true and save the application
if problem is still there then apply step-2
Restart your editor
if still problem not resolved then apply step-3
Change any route, revert it back and save the application. It'll start compiling. i.e.
const routes: Routes = [
{
path: '', // i.e. remove , (comma) and then insert it and save, it'll start compiling
component: MyComponent
}
]