onsen-ui

Combine Onsen UI sliding menu and tabbar

喜你入骨 提交于 2019-12-13 05:20:18
问题 I searched and didn't really find the right answer. I have the sliding menu in the top left for the 'full menu' but I also want the tab bar at the top to highlight 3 or 4 specific links/pages. How can I have them both working? When I place the tabbar in my script, the sliding menu doesn't work right. 回答1: There's no trouble on implementing sliding and tabbar. <ons-sliding-menu main-page="page1.html" menu-page="menu.html" side="left" max-slide-distance="250px" var="menu"> </ons-sliding-menu>

cordova back button fires event listener but app closes anyway

对着背影说爱祢 提交于 2019-12-12 06:37:48
问题 I have the following code where if the user presses back button on his device, I want to show him a popup before he is able to exit the app. However, this does not work for me. The alert box is showed but the app also closes. document.addEventListener("deviceready", function() { document.addEventListener("backbutton", function(e) { e.preventDefault(); $scope.alertDialog.show(); }, false); }, false); Cordova version:6.4.0 And before someone brings it out - cordova.js is included in the index

How to retain json objects in multiple ons-template pages in onsenui?

点点圈 提交于 2019-12-12 04:47:20
问题 Here I am populating json objects in ajax. In navigator page, it retains all the json objects. But when I switch to another template (page2.html), it doesn't retain the json objects. I need to populate the userid, acc_nbr(mentioned in the code) in other ons-template pages. Any help regarding this? Here is my code. <script> $(document).ready(function(){ $.ajax({ type: "GET", url: "Controller?token=123", dataType: 'json', success: function(data){ $('#userid').html(data.userid); $('#acc_nbr')

Unable to call function not getting page.matches OnSenUi

泪湿孤枕 提交于 2019-12-12 03:45:45
问题 Project Attached HERE I have wasted my whole life (actually one week) figuring out this problem. I am at the beginning stage of Hybrid App Development and this thing is hurting me. I am working in Cordova and using OnSen UI as my framwork for developing an App. My JavaScrip and jQuery everything is fine but I am unable to call functions from onClick method. What I want is, inside: <ons-template id="fetchPage.html"> , I have div with id="divFtechHere" I want to find it and want to call: if

OnsenUI - Select element with jQuery/JS (ons-template issue?)

混江龙づ霸主 提交于 2019-12-12 02:13:07
问题 I’m brand new to OnsenUI and so far I’m really enjoying the look and feel of it all. I’m using it with plain JS and a little jQuery. My issue is: I cannot select anything (ID, Class etc.) using JS or jQuery while I’m using ons-template. When I remove this I don’t have any issues, buuuut I’m using ons-splitter as my navigation method. (note: I've also tried tabs etc) Is there something I’m doing wrong? <ons-splitter> <ons-splitter-side id="menu" side="left" width="220px" collapse swipeable>

jQuery works in browser, but not in an android emulator

本秂侑毒 提交于 2019-12-12 01:15:02
问题 I'm a noob in hybrid development and I'm trying to use jQuery in my App. I'm surprised that the my code is working fine in the browser, but not in an android emulator and I don't quite understand the reason for that. Here is my code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Security-Policy"> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> <link rel="stylesheet" type=

Using Onsen, how to write server side code in NodeJs that will render Jade files as HTML in a splitter

家住魔仙堡 提交于 2019-12-12 00:48:42
问题 In my Onsen app I have the following splitter. I am using Jade, and rendering all the other pages from the list items in html (despite the fact that they are in separate jade files) by including the files at the bottom of the page, as shown below: body(ng-controller='...') ons-splitter(var='mySplitter') ons-splitter-side(var='menu' side='left' width='220px' collapse swipeable) ons-page ons-list ons-list-item(ng-click="root.load('home.jade')", tappable='') | Home ons-list-item(ng-click="root

Having trouble combining Onsen UI ons-sliding-menu and ons-tabbar

安稳与你 提交于 2019-12-11 17:27:13
问题 Having trouble combining Onsen UI ons-sliding-menu and ons-tabbar. I want to have the sliding menu on the top and a icon bar at the bottom. I have tried the following: <body> <ons-screen> <ons-sliding-menu behind-page="menu.html" above-page="navigator1.html"> </ons-sliding-menu> <ons-tabbar> <ons-tabbar-item active="true" label="Home" icon="home" page="navigator1.html"></ons-tabbar-item> <ons-tabbar-item label="Camera" icon="camera" page="page2.html"></ons-tabbar-item> <ons-tabbar-item label=

Doesn't show div in onsen ui and angularjs

杀马特。学长 韩版系。学妹 提交于 2019-12-11 12:48:40
问题 in my app i try to show my search div into my toolbar. Now my searchbar is outside from my toolbar and works fine (show and hide when i click on my search button). When i try to put my searchbar into my toolbar my search button doesnt work (doesnt show). My html code: <ons-page ng-controller="alojamientosController" data-ng-init="getAllRecords()"> <ons-toolbar> <div class="left"> <ons-toolbar-button ng-click="menu.toggle()"><ons-icon icon="ion-navicon-round" fixed-width="false"></ons-icon><

How to disable android back button handler in ONSEN-UI Phonegap?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 12:15:07
问题 I am developing a phonegap application in ONSEN-UI, in which I want to disable the android back button handler. I've tried Phonegap's backbutton hadler code to disable it. But I am unable to do it. Is there any other way to do it? My Code: document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady() { document.addEventListener("backbutton", function (e) { e.preventDefault(); }, false); } 回答1: This is explained in Onsen UI docs: http://onsen.io/reference/ons.html