簡體   English   中英

填充離子歷史框架

[英]Populating the ionic historic framework

我需要知道如何填充離子骨架的歷史。 我很了解自己的窗戶:

 window.history.pushState({upage:sel}, sel, document.location.origin + document.location.pathname +sel);

我的問題是,我需要記錄頁面中值得慶祝的“名稱”,因為我花了再次單擊“后退”按鈕,他應該恢復原來的視野,這種使用返回窗口的方法只返回一個視野。

這是處理歷史記錄的一種方法,您可以將一些選項傳遞給每個控制器,以便在僅用於堆疊/操縱目的時更改其行為。

希望這段代碼對您有所幫助!

 // Jump to state "first-state" $state.go('first-state', {options: values, title: "Custom title"}).then(function() { // Make this state the Root (or not, or at another step) $ionicHistory.clearHistory(); // Jump to "another-state" $state.go('another-state', {options: values}).then(function() { // [...] $state.go('another-jump', {options: values}); }); }); 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM