ons-navigatorにぶら下がるhtmlをpage属性で指定すると上手く動かないのですがこちらは仕様になりますでしょうか?
具体的には以下のようなコードになります。
今後、navigatorにぶら下がるhtmlは別ページでも使い回したいために別ファイルで実装できるかの検証中にこの問題にぶつかりました。
index.html(ListCtrlが呼ばれない)
<ons-template id="navigator.html"> <ons-navigator page="list.html"></ons-navigator> </ons-template> <ons-template id="list.html"> <ons-page ng-controller="ListCtrl"> <!-- ページの実装 --> </ons-page> </ons-template>
index.html(ListCtrlが呼ばれて期待通りの挙動)
<ons-template id="navigator.html"> <ons-navigator> <ons-page ng-controller="ListCtrl"> <!-- ページの実装 --> </ons-page> </ons-navigator> </ons-template>
ご確認お願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。