There is a problem with dynamically creating base href and there is a decision at this question Angular 2 / 4 / 5 - Set base href dynamically, but this decision not working