index.html でOns-navigatorを使いpageを移動します。
<html> <body>... <ons-navigator page="./main.html" var ="page"></ons-navigator> ... </body> </html>
main.htmlは別のファイルに指定しておりng-includeで取得させています。
<ng-include src="'main.html'" ></ng-include> <ons-template id="main.html"> <ons-page> <ons-list> <ons-tabbar position="top" > <ons-back-button>Back</ons-back-button> <ons-tab page="page1.html" onclick="page.pushPage('page1.html',{callback:function(){...}});"></ons-tab> </ons-tabbar> </ons-list> .....
<ng-include src="'page1.html'" ></ng-include> <ons-template id="page1.html"> <ons-template id="page1.html"> <ons-page> <ons-list id="TABLE"></ons-list> //ここを書き換えたい </ons-page> </ons-template> ...
mainからpage1を読み込んだ際に
page.pushPage('page1.html',{callback:function(){ここで書き換え処理}})
としIDがTABLEのons-listを書き換えしています
最初の読み込みでは問題なく書き換えされるのですが、一度popPage()し再度読み込むと書き換えされません、エラーも出ておらず・・
予想では、一度popPageしたせいでIDの取得が正常に行われていないのではないかと思っています、アドバイスお願いいたします。
回答1件
あなたの回答
tips
プレビュー