小编And*_*ira的帖子

在Onsen ui打开模态

如何在Onsen ui中插入模态或对话框?

的index.html

<ons-screen>
<ons-navigator ng-controller="Principal" title="Lista DC" right-button-icon="fa fa-lg fa-bars" on-right-button-click="novoProduto()">
Run Code Online (Sandbox Code Playgroud)

principal.js

function Principal($scope, Data){
    $scope.items = Data.items;  

    $scope.showDetail = function(index){
        var selectedItem = Data.items[index];
        Data.selectedItem = selectedItem;
        $scope.ons.navigator.pushPage('detail.html', { title : selectedItem.title });
    }

    $scope.novoProduto = function(){
        $.mobile.changePage( "page.html", { role: "dialog" } );
    }
}
Run Code Online (Sandbox Code Playgroud)

onsen-ui

1
推荐指数
1
解决办法
5366
查看次数

标签 统计

onsen-ui ×1