Skip to content

Commit 18febff

Browse files
Fix routes not working with baseHref
1 parent 404ccd9 commit 18febff

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="{{columnSizes.columns[3].buildClasses()}} row-element d-flex align-items-center">
2626
<div class="text-center w-100">
2727
<div class="btn-group relationship-action-buttons">
28-
<a *ngIf="bitstreamDownloadUrl != null" [href]="bitstreamDownloadUrl"
28+
<a *ngIf="bitstreamDownloadUrl != null" [routerLink]="bitstreamDownloadUrl"
2929
class="btn btn-outline-primary btn-sm"
3030
title="{{'item.edit.bitstreams.edit.buttons.download' | translate}}"
3131
[attr.data-test]="'download-button' | dsBrowserOnly">

src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-dat
1313
import { getBitstreamDownloadRoute } from '../../../../app-routing-paths';
1414
import { By } from '@angular/platform-browser';
1515
import { BrowserOnlyMockPipe } from '../../../../shared/testing/browser-only-mock.pipe';
16+
import { RouterTestingModule } from '@angular/router/testing';
1617

1718
let comp: ItemEditBitstreamComponent;
1819
let fixture: ComponentFixture<ItemEditBitstreamComponent>;
@@ -72,7 +73,10 @@ describe('ItemEditBitstreamComponent', () => {
7273
);
7374

7475
TestBed.configureTestingModule({
75-
imports: [TranslateModule.forRoot()],
76+
imports: [
77+
RouterTestingModule.withRoutes([]),
78+
TranslateModule.forRoot(),
79+
],
7680
declarations: [
7781
ItemEditBitstreamComponent,
7882
VarDirective,

src/app/shared/cookies/klaro-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const GOOGLE_ANALYTICS_KLARO_KEY = 'google-analytics';
2222
export const klaroConfiguration: any = {
2323
storageName: ANONYMOUS_STORAGE_NAME_KLARO,
2424

25-
privacyPolicy: '/info/privacy',
25+
privacyPolicy: './info/privacy',
2626

2727
/*
2828
Setting 'hideLearnMore' to 'true' will hide the "learn more / customize" link in

0 commit comments

Comments
 (0)