@@ -8,6 +8,7 @@ import {Bitstream} from '../../core/shared/bitstream.model';
88import { BitstreamDataService } from '../../core/data/bitstream-data.service' ;
99import { NativeWindowRef , NativeWindowService } from '../../core/services/window.service' ;
1010import { getFirstCompletedRemoteData } from '../../core/shared/operators' ;
11+ import { InternalLinkService } from '../../core/services/internal-link.service' ;
1112import { hasValue } from '../empty.util' ;
1213import { ItemSearchResult } from '../object-collection/shared/item-search-result.model' ;
1314import { followLink } from '../utils/follow-link-config.model' ;
@@ -87,6 +88,7 @@ export class CarouselComponent implements OnInit {
8788 isLoading$ = new BehaviorSubject ( true ) ;
8889
8990 constructor (
91+ public internalLinkService : InternalLinkService ,
9092 protected bitstreamDataService : BitstreamDataService ,
9193 @Inject ( NativeWindowService ) private _window : NativeWindowRef ,
9294 ) {
@@ -163,19 +165,6 @@ export class CarouselComponent implements OnInit {
163165 return item . firstMetadataValue ( this . link ) ;
164166 }
165167
166- isLinkInternal ( link : string ) {
167- return link . startsWith ( '/' ) || link . startsWith ( this . currentURL ) ;
168- }
169-
170- transformInternalLink ( link : string ) {
171- if ( link . startsWith ( this . currentURL ) ) {
172- const currentSegments = link . substring ( this . currentURL . length ) ;
173- return currentSegments . startsWith ( '/' ) ? currentSegments : `/${ currentSegments } ` ;
174- } else {
175- return link ;
176- }
177- }
178-
179168 /**
180169 * to open a link of an item
181170 */
0 commit comments