It would be great not to have a normal page load in "_self" when clicking on a link inside Ember. Currently, using linkify and clicking on a link that directs to a page in the same ember-app, reloads Ember on that page, but that loading time wouldn't be there if a normal transition was used.
Our current solution is always use _blank and override the click event (not my code 😒)
click(ev) {
// Source: https://github.com/whoward/ember-twitter-clone/commit/93af68d9f504b8b8972487e6c09851d3523a3678
const href = this.$(ev.target).attr('href');
if (href) {
const parser = document.createElement('a');
parser.href = href;
if (!(parser.hostname === window.location.hostname || parser.hostname === `www.${window.location.hostname}`)) {
return;
}
ev.preventDefault();
const router = getOwner(this).lookup('router:main');
router.transitionTo(parser.pathname);
}
}
It would be great not to have a normal page load in
"_self"when clicking on a link inside Ember. Currently, using linkify and clicking on a link that directs to a page in the same ember-app, reloads Ember on that page, but that loading time wouldn't be there if a normal transition was used.Our current solution is always use
_blankand override the click event (not my code 😒)