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

Can't access data from parent component when using a base href #23

Open
simonferndriger opened this issue Aug 19, 2024 · 2 comments
Open

Comments

@simonferndriger
Copy link

simonferndriger commented Aug 19, 2024

When I use <base href="../"> in the file where I include html files with x-ajax, the base href is used (surprisingly) for the include path (which is cool), but also additionally somehow which messes the include up, because the included file loses somehow access to the data from the parent component in that case.

@ekwoka
Copy link
Owner

ekwoka commented Aug 19, 2024

Can you show some code and context for what you mean?

How do you mean it loses access to the parent scope?

@simonferndriger
Copy link
Author

simonferndriger commented Aug 19, 2024

Sure, but for now I only know that the include can't access "page" anymore, which is defined in the <html x-data="$"> component and works well in the include, if there is no base href used in the index.html including the include.

Example:

Does this help?

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

2 participants