-
Notifications
You must be signed in to change notification settings - Fork 169
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
How can i change baseHref, need for Single page app #2334
Comments
Sorry for answering late - I've missed your ticket during my vacations. I'm afraid I don't understand what you're trying to do. Are you looking for https://pdfviewer.net/extended-pdf-viewer/options |
as part of SPA we need to pass /mfes/ from child add, as this is called from parent App, currently we are updating basehref with this code and no way i can update same. this.baseHref = this.platformLocation.getBaseHrefFromDOM(); exp : https://abc.xyz.com/portal If i want to use Child app assets inside parent app i need to pass assets like below exp : https://abc.xyz.com/mfes/childApp/assets/images/1.png so for SPA if you can allow me to override this value it will be really helpful |
This sounds like you're looking for |
This is not just updating assetsFolder as basehref will be always taken by below code this.baseHref = this.platformLocation.getBaseHrefFromDOM(); so if i have app running with https://abc.xyz.com/123ismybasehref/home.html and i change assets folder by pdfDefaultOptions.assetsFolder = newassets/images default path for images will change to /123ismybasehref/newassets/images for SPA apps we need to access assets from /mfes/123ismybasehref/newassets/images So there is no way to add /mfes before basehref currently as it will always take from browser url. This is important change needs to be added for all SPA apps. |
Can you send me a reproducuer, please?
Please elaborate. Every application written in React, Vue.js or Angular is an SPA app. Why do you think changing my library improves any application written in React.js or Vue.js? |
I need your help!
How can i change baseHref instead of directly reading from browser?
Describe the bug
I am looking to update baseHref so that i can point child app pdfjs file?
For SPA parent app domain is getting picked and baseHref not allowing to set public path for js files
Version info
Demo PDF file
NA
The text was updated successfully, but these errors were encountered: