Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari renders a black block when used in any route different than '/' #23

Closed
pzmuda13 opened this issue Nov 28, 2018 · 4 comments
Closed

Comments

@pzmuda13
Copy link

pzmuda13 commented Nov 28, 2018

In routes different than home page - '/' all of loaders are black blocks. This happens only in safari - desktop and mobile.

I reproduced this bug in posted demo app. I upgraded the lib version to 2.0.0

The same is happening in my application using angular 7.

https://ngx-content-loader-hqrrey.stackblitz.io - this works fine
https://ngx-content-loader-hqrrey.stackblitz.io/route - this is broken

link to editor:
https://stackblitz.com/edit/ngx-content-loader-hqrrey

@pzmuda13 pzmuda13 changed the title IOS renders a black block when used in any route different than '/' Safari renders a black block when used in any route different than '/' Nov 28, 2018
@NetanelBasal
Copy link
Member

Try in the original repo. This is an Angular clone.

@pzmuda13
Copy link
Author

pzmuda13 commented Dec 3, 2018

According to response from original repo - danilowoz/react-content-loader#93 (comment) there is issue related to urls. The solution is removing base href and use injection token instead - https://angular.io/api/common/APP_BASE_HREF

Additional using cli to set assets base location there is provided flag "--deploy-url". For me when all assets are directly on server also was required to add '/' before all src used in html

@NetanelBasal
Copy link
Member

Thanks, closing for now.

@SionGrey
Copy link

According to response from original repo - danilowoz/react-content-loader#93 (comment) there is issue related to urls. The solution is removing base href and use injection token instead - https://angular.io/api/common/APP_BASE_HREF

Additional using cli to set assets base location there is provided flag "--deploy-url". For me when all assets are directly on server also was required to add '/' before all src used in html

This hack work only if your base href was "/", otherwise static assets from app assets folder will fail to load.

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

No branches or pull requests

3 participants