Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed Aug 5, 2024
1 parent 54bec2b commit 5641e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/product-list/product-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export class ProductListComponent {
private baseUrl: string;

constructor(private sharedService: SharedService) {
this.baseUrl = `${window.location.protocol}//${window.location.host}`;
this.baseUrl = `${window.location.protocol}//${window.location.host}${window.location.pathname}`;
}

getFullUrl(endpoint: string): string {
return `${this.baseUrl}/${endpoint}`;
return `${this.baseUrl}${endpoint}`;
}

async activate(): Promise<void> {
Expand Down

0 comments on commit 5641e8a

Please sign in to comment.