au7
au7 copied to clipboard
Unable to access the page.url params? Aurelia pages only get initialized once?
Hi.
I was very excited to try out your framework adaptation but I am unable to figure out how to reinitialize the aurelia view models on each page load?? I want to be able to pass parameters, say, on selecting an item from a list, and then navigate to a detailed view accordingly, but I cannot see how to access the usual F7 pageData.query parameter objects? And the aurelia view models themselves seem to only ever get created once, and so i can never update teh view model data, nor can i figure out how to get access to the usual F7 goodies like the router for rerouting, accessing the uri parameters etc?
I can't see anywhere that you or Timo or the Typescript guy who forked your code ever do anyting more complicated than route between static pages? Am i missing something obvious?
Thanks
I can only speak on a high level since it's been too long for me to recall all the nitty gritty details, but you should be able to get these tools to work for your use case. For the router, F7's is in use, so anything you can do with its router should be fair game. Again, that's high level, but if you figure out any specific F7 router feature that appears to be broken, I would be interested to hear about it.
I have figured out how to access the router (and URL Params) in the Aurelia viewmodel classes (through some dirty hackery) but the larger issue is that because the viewmodel classes are initialised only one time, they never rerender or refresh while navigating around...
Did you ever use this code as the basis of a project with business logic behind it, or was it more of a proof of concept thing?
I really don't want to get into ionic but I'm kind of going to have to if I can make this work
Thanks for the quick reply btw On 12 Dec 2017 7:15 p.m., "Alexander Flenniken" [email protected] wrote:
I can only speak on a high level since it's been too long for me to recall all the nitty gritty details, but you should be able to get these tools to work for your use case. For the router, F7's is in use, so anything you can do with its router should be fair game. Again, that's high level, but if you figure out any specific F7 router feature that appears to be broken, I would be interested to hear about it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alflennik/au7/issues/11#issuecomment-351120069, or mute the thread https://github.com/notifications/unsubscribe-auth/AJhGFGphpQ19dltnFgGI1pNAWljFAabKks5s_rSmgaJpZM4Q_Jgd .
Yes, this ended up as more a proof of concept since I didn't get a chance to continue the project that formed the basis of the repo. That, however, might be a good thing, because it means that clean solutions to the problems you are experiencing very likely exist -- just no one has done a PR for them yet. Let me know how you solve these problems, if you keep charging forward with this.
@daleholborow Can you check if adding this to the view-models helps:
determineActivationStrategy () {
return activationStrategy.replace;
}