更改URL而不触发DOM更新 [英] Change the URL without triggering a DOM update

查看:87
本文介绍了更改URL而不触发DOM更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不触发DOM更新的情况下更改垃圾邮件中的URL。
IE像

How can I change the URL in ember without triggering a DOM update. IE something like

window.location.hash = '/items/20';

然而,没有触发Embers路由系统,导致的DOM更改。
注意我正在使用hashlocation,但是打算切换到历史记录位置

However without triggering Embers routing system and the resulting DOM changes. Note I'm currently using the hashlocation but intend to switch to history location

背景阅读

  • http://emberjs.com/api/classes/Ember.Location.html
  • http://emberjs.com/api/classes/Ember.HashLocation.html
  • Why I want to do this in the first place (Item modal interface)

推荐答案

这是很多挖掘来源,但是这里:

Well this took a lot of digging through the source, but here goes:

EmberApp.Router.router.updateURL('/item/10')

这篇关于更改URL而不触发DOM更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆