Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

HttpClientInMemoryWebApiModule disabling svg mat-icon #195

Open
viniciusmiguel opened this issue Apr 26, 2018 · 1 comment
Open

HttpClientInMemoryWebApiModule disabling svg mat-icon #195

viniciusmiguel opened this issue Apr 26, 2018 · 1 comment

Comments

@viniciusmiguel
Copy link

When configuring the InMemoryWebAPI SVG icons cannot be loaded using

iconRegistry.addSvgIcon('icon', sanitizer.bypassSecurityTrustResourceUrl('iconurl.svg'));
I tried to configure with apiBase parameter but without success.

Console: Error retrieving icon: undefined

The InMemoryWebAPI must ignore other urls outside API URL scope.

@rkorrelboom
Copy link

Try the passThruUnknownUrl option to allow the request to pass through to the actual asset:

HttpClientInMemoryWebApiModule.forRoot(InMemoryApiService, {
      passThruUnknownUrl: true
})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants