onsen-ui

Angular variable not binding to view

↘锁芯ラ 提交于 2019-12-23 16:34:27
问题 I have an Angular/Onsen app that has an image which is put into a HTML5 canvas tag, and I am picking the color of the pixel I am on on hover . The view is pretty simple: <ons-template id="live.html"> <ons-page ng-controller="LiveController"> <ons-toolbar> <div class="left"> <ons-toolbar-button ng-click="menu.toggle()"> <ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon> </ons-toolbar-button> </div> <div class="center">Live Camera</div> </ons-toolbar> <canvas id="canvas"

Can Onsen be used without Angular? I would rather use Aurelia

你说的曾经没有我的故事 提交于 2019-12-21 22:32:37
问题 Can Onsen be used without Angular? Can Aurelia data bind to Onsen? 回答1: Yes, it can be used without Angular. You would need to take advantage of their css, and develop your custom components like the way they did for Angular. For example, a simple ons-list Custom Element would be something like: ons-list ons-list.html <template> <ul class="list ${inset ? 'list--inset' : ''}"> <content select="ons-list-header"></content> <content select="ons-list-item"></content> </ul> </template> ons-list.js

how to change html of dialog dynamically in onsen

半腔热情 提交于 2019-12-21 21:37:27
问题 I'm trying to dynamically change the html content of a dialog of onse.ui , but it is not working for me, my code is as below: Here my html code. <ons-template id="popupFechaCalendario.html"> <ons-dialog style="height: 300px;" var="naviDialog" cancelable> <ons-navigator var="myNav"> <ons-toolbar inline> <div class="center contenedorPopup" id="popupFechaCalendario_fecha">html content</div> </ons-toolbar> </ons-navigator> </ons-dialog> </ons-template> And here my Javascript code. $("

Onsen 2.0 - Adding event listener to Ons-Switch with Javascript

若如初见. 提交于 2019-12-20 03:53:49
问题 I fear I am missing something really simple, but I have tried multiple attempts with various errors. On to the code: <script> document.getElementById("optStats").on("change", function(e) { alert("Switch changed!"); }); </script> <ons-switch modifier="list-item" id="optStats"></ons-switch> So the above does not work. It generates an error of Uncaught TypeError: Cannot read property of on of null . So I assumed that I needed to add the function to the onload init function but it still failed

Drop down option menu using onsen UI

冷暖自知 提交于 2019-12-19 17:44:46
问题 I want to develop drop down menu header as available in android navigation toolbar. I am using phonegap & onsen UI Framework to develop mobile application. I can able to load sliding menu from left & right side but right now my requirement is to open drop down if one should press icon display in image. Same list should be displayed(open) if user press option button from phone device. I am not using jquery or jquery mobile to develop mobile UI. I don't want to develop drop down menu using

Onsen uI:Controll android backbutton routes:

本小妞迷上赌 提交于 2019-12-18 09:11:26
问题 I am developing an android application in cordova using Onsenui,in which i want to navigate to previous page when device backbutton is clicked I am using answer from this question to solve the issue Here is my code document.addEventListener("backbutton",onBackButtonPressed, false); function onBackButtonPressed(){ alert('backbutton'); var element = document.querySelector( ".navigator-container"); var scope = angular.element( element ).scope(); scope.popPage(); } I will get the following error

outside javascript not work with onsen framewowrk

≯℡__Kan透↙ 提交于 2019-12-13 22:13:09
问题 i am use onsen.ui framework but when i include any script he do not working how i do accept include javascript in the framework window.console = window.console || function(t) {}; span{ color:red; } <html><head> <meta charset="UTF-8"> <title>CodePen - Navigator</title> <link rel='stylesheet prefetch' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/css/onsenui.css'> <link rel='stylesheet prefetch' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/css/onsen-css-components.css'>

Onsen-ui - back to home

房东的猫 提交于 2019-12-13 12:35:54
问题 I want to go back home from page4.html without using the menu, but I get this error Error: You can not supply no "ons-page" element to "ons-navigator This is my code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Sliding Menu</title> <link rel='stylesheet prefetch' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.0-beta/build/css/onsenui.css'> <link rel='stylesheet prefetch' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.0-beta/build/css/onsen-css-components.css'> </head>

Onsen UI page navigation with parameters not working

牧云@^-^@ 提交于 2019-12-13 12:30:34
问题 I'm using Onsen UI and AngularJS, and trying to pass a value on Onsen navigation , but it is not working. What can be wrong? page1.html <ons-button modifier="clean" ng-click="menu.setMainPage('page2.html', {closeMenu: true}, {color:'red'})"><img src="red.jpg"></ons-button> <ons-button modifier="clean" ng-click="menu.setMainPage('page2.html', {closeMenu: true}, {color:'blue'})"><img src="blue.jpg"></ons-button> page2.html <p>the color is: {{ color }}!</p> app.js app.controller('colorController

Unable to run angular js code with onsen cordova

淺唱寂寞╮ 提交于 2019-12-13 07:39:27
问题 I want to run a simple Angular js code but I am not able to do it in Cordova with Onsen ui I am getting an error link below : https://docs.angularjs.org/error/ng/areq?p0=HelloCtrl&p1=not%20a%20function,%20got%20undefined I am referring this page : https://onsen.io/blog/onsen-ui-tutorial-angularjs-essentials-for-using-onsen-ui-part-1/ Using Onsen 1 p1.html: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Security-Policy"/> <link href="css/bootstrap.min.css" rel=