routing with base url in angular 8 code example
Example 1: angular router navigate base href
import { APP_BASE_HREF } from '@angular/common';
Example 2: angular router navigate base href
providers: [
{
provide: APP_BASE_HREF,
useValue: '/' + (window.location.pathname.split('/')[1] || '')
}
]