And since you’ve already loaded customerRecord before retriggering activation, its unlikely (but possible) that these 4 methods will change something on the page. typically these are used for loading/persisting data and confirming navigation. attached/detached are typically used doing custom rendering.
Perhaps you can share with us what you were expecting to see and what you’re actually experiencing as well as how that’s implemented
I have a form that I want to load information on a customer from an AJAX call, and then allow the user to edit that form and save the information back to the database.
I think I figured out the answer to the reload thing?
And that makes perfect sense. however if you go this route, then there is no need to call your current reloadCustomer implementation. instead you could do something like this:
this.customerRecord = null; // This will trigger the loading placeholder to appear again
this.customerRecord = await .... // Once this is resolved, the loading placeholder will be swapped out with the custom element
I’d suppose there is very little for you to change, if someone calls getCustomerRecord then the old record will be unset, which will update the UI back to the loading screen and triggers a load in the background, once that returns with the actual customerRecord, the UI will update again presumably displaying that. Aurelia has fine examples of how templating works, e.g. http://aurelia.io/docs/tutorials/creating-a-contact-manager. I suggest you go over that since it certainly helps in understanding what’s going on