打开拆分视图。模板错误 "Page not found"

ons-split-view. Template error "Page not found"

我将拆分视图定义为:

<ons-split-view
    var="noticies_split"
    secondary-page="secundaria"
    main-page="principal"
    main-page-width="70%"
    collapse="portrait">
</ons-split-view>

如果我连续定义两个模板,我会得到 "Page is not found: principal",即:

<ons-template id="secundaria">
</ons-template>
<ons-template id="principal">
</ons-template>

如果我在它们之间定义第三个模板,它工作正常,即:

<ons-template id="secundaria">
</ons-template>
<ons-template id="aux">
</ons-template>
<ons-template id="principal">
</ons-template>

当定义超过 2/3 的模板时,偶数位置的模板出现相同的错误,但奇数位置的模板则不会。

有人可以帮忙吗?

我在 github 项目上发布了一个问题:ISSUE #392

我正在使用 onsenui - v1.2.1 - 2014-12-01

我用 onsen-tabbar 得到了相同的结果。

我通过在 onsen-tabbar 标签内移动 onsen-template 来修复它

示例:

<ons-tabbar>
    <div style="display:none">
        <ons-template id="page1.html">
        </ons-template>
        <ons-template id="page2.html">
        </ons-template>
        <ons-template id="page3.html">
        </ons-template>
    </div>

    <ons-tab page="page1.html" active="true">
    </ons-tab>
    <ons-tab page="page2.html">
    </ons-tab>
    <ons-tab page="page3.html">
    </ons-tab>
</ons-tabbar>

希望能解决您的问题

干杯...