onsen-ui

Add a login page in my Onsenui app

▼魔方 西西 提交于 2019-12-06 04:51:46
问题 I'd like to set a login page before entering the main page. How can I do that just before this instruction : <ons-screen page="sliding_menu.html"></ons-screen> I use The Monaca IDE Thanks for the help Charles 回答1: You can try this way: index.html <ons-screen page="login.html" login.js function LoginController($scope){ $scope.login = function(id, password){ $scope.ons.screen.presentPage('sliding_menu.html'); } } login.html <div class="page center" ng-controller="LoginController"> <div class=

Onsen UI page navigation with parameters not working

纵饮孤独 提交于 2019-12-06 01:56:51
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', function($scope, colorData) { var page = $scope.ons.navigator.getCurrentPage(); $scope.color = page

How to download a file using Cordova File Transfer plugin in iOS

China☆狼群 提交于 2019-12-06 01:47:23
I have used the following code to download file: $scope.onDownloadMusic = function( live ) { var downloadUrl = offlineUrl + fileName; var hostUrl = encodeURI(live.url); var fileTransfer = new FileTransfer(); fileTransfer.download( hostUrl, downloadUrl, function(entry) { alert('Your download has completed.'); }, function(error) { alert(error.source); }, false, { headers: { "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA==" } } ); }; It works fine on Android. However, when I tried the same code on iOS, I always got an error. I didn't know what went wrong. Any help is really

How to control page routes in the controller?

此生再无相见时 提交于 2019-12-05 14:43:49
OnsenUI is great. Fast and easy. However, there is not much documentation for controlling Onsen logic in the controller. Like for instance, I want to do a $location.path('/newpath') inside a controller. How is done in Onsen? I tried "ons.navigator.pushPage('partials/latestjob.html');" in my controller function but doesn't work. Are we limited to ng-click in Onsen to go to another page? Thanks. In Onsen UI 1.04, you can access navigator from inside the controller as follows. $rootScope.ons.navigator.pushPage('new_page.html'); Another way is $rootScope.ons.$get('#navigator').pushPage(pagename);

OnsenUi Angular and Login

本小妞迷上赌 提交于 2019-12-04 14:18:56
I'm trying to develop a mobile app with onsen+cordova What i need is: When the app start it load login.html page. If the app detect that the user is logged then it redirect to the home.html For each "protected page" i want to call a function that detected if user is logged. If not i want to redirect to login page. All the "protected pages" have a slide menu. Following what i've done: index.html <html ng-app="app2gest"> <head> <meta charset="utf-8"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> <meta name="viewport" content="user

Add a login page in my Onsenui app

一世执手 提交于 2019-12-04 09:47:23
I'd like to set a login page before entering the main page. How can I do that just before this instruction : <ons-screen page="sliding_menu.html"></ons-screen> I use The Monaca IDE Thanks for the help Charles You can try this way: index.html <ons-screen page="login.html" login.js function LoginController($scope){ $scope.login = function(id, password){ $scope.ons.screen.presentPage('sliding_menu.html'); } } login.html <div class="page center" ng-controller="LoginController"> <div class="row"> <div class="col"> <ons-text-input placeholder="id" ng-model="id"> </ons-text-input> </div> </div> <div

Onsen ui navigation with parameters

旧城冷巷雨未停 提交于 2019-12-04 04:27:20
问题 I am using onsen ui with typescript and angularJS with an ons-sliding-menu: <ons-sliding-menu menu-page="menu.html" main-page="link/to/some/page.html" side="left" var="menu" type="reveal" max-slide-distance="260px" swipable="true"> </ons-sliding-menu> <ons-template id="menu.html"> <ons-page modifier="menu-page"> <ons-toolbar modifier="transparent"></ons-toolbar> <ons-list class="menu-list"> <ons-list-item class="menu-item" ng-click="menu.setMainPage('link/to/some/page.html', {closeMenu: true}

Sencha vs Ionic vs Jquery Mobile vs Appcelerator Titanium [closed]

跟風遠走 提交于 2019-12-03 03:25:34
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I have a good experience on HTML5,Javascript, jQuery, AngularJS. I am about to develop a hybrid mobile app. i just want to know which one of them is the best. And i am planning with IONIC as it has started supporting windows too. How far this will be helpful. is there

Onsen UI - Using Slide-Menu just for specifics pages

家住魔仙堡 提交于 2019-12-02 17:51:01
问题 I'm building an app where I have the first 3 pages (login, register and password recover) without toolbar and sliding-menu. Inside of my app (logged pages) I want to provide the slide-menu, but I'm not achiving this goal. How can I do it? Here my app: index.html <!DOCTYPE HTML> <html lang="pt-br"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="components

Onsen ui navigation with parameters

懵懂的女人 提交于 2019-12-01 22:36:53
I am using onsen ui with typescript and angularJS with an ons-sliding-menu: <ons-sliding-menu menu-page="menu.html" main-page="link/to/some/page.html" side="left" var="menu" type="reveal" max-slide-distance="260px" swipable="true"> </ons-sliding-menu> <ons-template id="menu.html"> <ons-page modifier="menu-page"> <ons-toolbar modifier="transparent"></ons-toolbar> <ons-list class="menu-list"> <ons-list-item class="menu-item" ng-click="menu.setMainPage('link/to/some/page.html', {closeMenu: true})"> Home </ons-list-item> <ons-list-item class="menu-item" ng-click="menu.setMainPage('link/to/some