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

a load is completely broken - AUR0707:route,load #1835

Open
wzrdtales opened this issue Nov 7, 2023 · 20 comments
Open

a load is completely broken - AUR0707:route,load #1835

wzrdtales opened this issue Nov 7, 2023 · 20 comments
Assignees

Comments

@wzrdtales
Copy link

wzrdtales commented Nov 7, 2023

The following

<a load="route: routeid; params.bind: {id: modId}">

causes AUR0707:route,load, even removing params.bind, still causes this error. This seems to be completely broken. The route exists, it uses the normal router. Not sure nothing special here to add much.

Here is a very simple straightforward bootstrapped project, that reproduces this:

https://github.com/wzrdtales/au-repro-router-error
https://stackblitz.com/github/wzrdtales/au-repro-router-error

@wzrdtales
Copy link
Author

also just

<a load="route: routeid;">

results in the same

@wzrdtales
Copy link
Author

in this example, it returns AUR0707: Bindable route not found on load. instead. also unexpected error which shouldn't happen at all

https://stackblitz.com/edit/au2-conventions-ab6pw8?file=src%2Fmy-app.html

@wzrdtales wzrdtales changed the title AUR0707:route,load a load is completely broken - AUR0707:route,load Nov 7, 2023
@wzrdtales
Copy link
Author

only working with this.router.load works, a load="router:xyz;" returns this error all the time.

i must say the experience is very very very frustrating

@wzrdtales
Copy link
Author

according to https://docs.aurelia.io/routing/navigating#html-load-attribute this should work, it does not.

@bigopon
Copy link
Member

bigopon commented Nov 10, 2023

@jwx are you able to have a look at the stackblitz?

@jwx
Copy link
Member

jwx commented Nov 14, 2023

@jwx are you able to have a look at the stackblitz?

Yes, will take a look as soon as possible. (Sorry for late reply, have been unavailable.)

Until then:

@bigopon Based on the error specified above, it seems to be related to template compiler and not the router in itself.

@wzrdtales Could you try

<a load="id: routeid;">

and see if that behaves differently?

@wzrdtales
Copy link
Author

id: seems to work

@wzrdtales
Copy link
Author

however, id: works, but then params.bind doesn't

@wzrdtales
Copy link
Author

and id does not work for child routes as it looks

@Sayan751
Copy link
Contributor

@wzrdtales In case you haven't found a solution for the problem, and your app strictly uses configured routing (as opposed to direct routing), may I suggest that you give the router-lite a try? The docs are here. If the router-lite also have the same problem, please let me know.

@wzrdtales
Copy link
Author

declined. router-lite lacks features we use.

@Sayan751
Copy link
Contributor

Noted. Just for my personal interest, may I ask what features those are?

@wzrdtales
Copy link
Author

wzrdtales commented Dec 28, 2023

no solution, just a workaround.

we use this function everywhere and use click trigger with this combined instead of using the official functions...

 goto (route, fragments) {
   return this.router.load(route, { fragments })
}

and params are just introduced into the route string directly...

goto(`/blabla/${id}/bla`)

@wzrdtales
Copy link
Author

we make use of direct routing

@wzrdtales
Copy link
Author

not sure if anyone is yet working on fixing this bug, but I guess someone is, as this is one of the very core functions that need to work properly.

@Sayan751
Copy link
Contributor

we make use of direct routing

Thank you for the clarification.

@migajek
Copy link

migajek commented Jan 14, 2024

have the same problem. and I find it pretty serious too.
it's even possible to reproduce it using the "recipe tutorial" example:

  1. open the stackblitz https://stackblitz.com/edit/au2-conventions-n56ej9
  2. in my-app.ts append id: 'home' to the first route definition
  3. in my-app.html change the home link to <a load="route: home">Home</a>
  4. in the console, you'll get AUR0707: Bindable route not found on load.

@jwx
Copy link
Member

jwx commented Jan 15, 2024

Sorry for the long wait! Rough family events have prevented me from being as active as I'd like for quite some time now. Gradually on my way back now.

Regarding the issue: In router, the load bindables are id and parameters (matching the properties in the configured route). @Vheissu , can you update the docs?

Please let me know if you run into any issues using these bindables.

@migajek
Copy link

migajek commented Jan 18, 2024

It seems to work when I changed the "route" to "id". Glad it's only docs issue. Thank you!

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

No branches or pull requests

5 participants