jeudi 10 octobre 2019

Ember, change current url and link-to targets without reloading data

How to refresh url and link-to without reloading data?

Figure an app where a user can change the name of his project, then the current url must be refreshed since it contains the name of the project.

Nothing excepts the url must be modified (no data reload)

The replaceURL method allow to do that:

this.router.location.replaceURL(urlWithNewProjectName)

The problem is everywhere in the app the link-to components continue to target the old url.

How to set a segment path of the url, in order to update link-to in the app?




Aucun commentaire:

Enregistrer un commentaire