如何在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