If there is a baseHref set angular.json, this could be causing you trouble for example if the baseHref="" try removing this or change it to baseHref="/"