简体   繁体   English

如何通过单击angularjs中的浏览器后退/前进按钮来后退/转发用户的历史记录

[英]how to back/forward user 's history by clicking the browser back/forward button in angularjs

I have a angularjs page, it contains two part, the first part on the left is a navigation list with a list of news categories, the central content is the news list. 我有一个angularjs页面,它包含两部分,左侧的第一部分是带有新闻类别列表的导航列表,主要内容是新闻列表。 so when people click one news category on the left, the central content will load the news list in ajax. 因此,当人们单击左侧的一个新闻类别时,中心内容将在ajax中加载新闻列表。

what I want to do now is, when the user click the back or forward button on the browser, the browser could back / forward user to the last navigation link he clicked. 我现在要做的是,当用户单击浏览器上的“后退”或“前进”按钮时,浏览器可以将用户后退/前进到他单击的最后一个导航链接。

how can I disable the browser back/ forward button 's default behavior and implement this in angular.js 如何禁用浏览器后退/前进按钮的默认行为,并在angular.js中实现

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Chrome扩展程序中,确定用户是否单击了浏览器的“后退”或“前进”按钮 - In Chrome extension determine if the user clicked the browser's Back or Forward button JavaScript和浏览器的后退/前进按钮 - JavaScript and the browser's back/forward button 如何区分浏览器后退/前进按钮? - How to distinguish browser back / forward button? history.pushstate使浏览器后退和前进按钮失败 - history.pushstate fails browser back and forward button 在带有框架的浏览器中返回按钮(前进的历史记录不起作用) - Button Back in Browser with Frames (history forward don't work) 如何操纵浏览器历史记录并捕获浏览器后退/前进按钮? - How to manipulate browser history and catch browser back/forward buttons? 使用ui路由器在AngularJS中的浏览器后退/前进按钮上重新加载页面 - Reload page on browser back/forward button in AngularJS with ui router 阻止用户使用浏览器的“后退”和“前进”按钮 - Stopping the user from using “Back” and “Forward” button of the browser 检测浏览器的前进和后退按钮并触发jquery事件 - Detect browser's forward and back button and trigger jquery event AngularJS后退/前进按钮更新模型/范围 - AngularJS back/forward button update model/scope
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM