ionic-framework

Auto turn off toggle button when other one is turned on

﹥>﹥吖頭↗ 提交于 2019-12-25 06:20:36
问题 i have nested toggle buttons which are off by default, when its on it save a value to localstorage. What i want to do is when one is turned on and you try to turn the other on, the first one should be turned off automatically while the other turns on .controller('shops',['$scope','$http','$timeout',function($scope,$http,$timeout){ $http.get('http://localhost/moves/templates/shopping.php').success(function(data){ $scope.shops=data ; }); $scope.pushNotification = {}; $scope.pushNotification

AngularFire - impossible to recover the time entered by the user in database

安稳与你 提交于 2019-12-25 05:46:31
问题 I've posted a precedent issue with my Background image in DIV. It's work successfully with current date. But when I want to adapt Background Image with time entered by user in database with model "starthourid", it's don't work (It display "night") ! But the database is OK, I can display "nameid" in HTML and "startdateid" with "starthourid". This is a part of my code : HTML : <div ng-repeat="event in events"> <div class="card" > <div class="sunrise item item-divider" ng-class="time"> <h2 class

Ionic 2 installation issues

浪子不回头ぞ 提交于 2019-12-25 05:36:32
问题 I am trying to use Ionic 2 on Windows 7 x64 bit and got stuck when using ionic start command. I have tried to read tutorials and installation instructions but got no luck. Here's the details of my problem: Found depreciation warnings during cordova and ionic installation: https://postimg.org/image/vf3qn8z9b/ Then it shows errors using following command in ionic: ionic start newProject sidemenu --v2 https://postimg.org/image/4vz80prq5/ context of my npm-debug.log: 9284 warn optional SKIPPING

Lock camera / screen orientation to landscape with Ionic / ngCordova

与世无争的帅哥 提交于 2019-12-25 04:45:15
问题 I am trying to lock camera orientation to portrait in the app and to landscape in the camera. For camera access I am using $cordovaCapture pluggin. For orientation cordova-plugin-screen-orientation. Both plugins work but orientation plugin doesn't affect camera. (Testing in an Android) screen.lockOrientation('portrait'); $scope.captureVideo = function() { var options = { limit: 1, duration: 15 }; screen.lockOrientation('landscape'); $cordovaCapture.captureVideo(options) .then(function

Angular.js Error: Duplicates in a repeater are not allowed - Track by index doesn't work

浪子不回头ぞ 提交于 2019-12-25 04:42:25
问题 Here is my code for angular js and ionic framework application. Code : HTML code: <ion-header-bar class="bar-calm"> <h1 class="title">Application Permissions</h1> </ion-header-bar> <ion-nav-view name="home"> <div class="bar bar-subheader bar-positive"> <h3 class="title"> {{app_name }}</h3> </div> <ion-content class="has-subheader"> <div class="list" ng-controller="CheckboxController"> <ion-checkbox ng-repeat="item in devList track by item.text" ng-model="item.checked" ng-checked="selection

Ionic weird spacing

梦想与她 提交于 2019-12-25 04:34:29
问题 When I use the following code to display a header, the title gets a weird left/right styling. Anybody knows what's wrong with it? Thanks! <ion-header-bar> <h1 class="title">BLE Demo</h1> <button class="button button-positive"> {{connectStatus == false ? "Connect" : "Disconnect" }} </button> </ion-header-bar> If I change the line {{connectStatus == false ? "Connect" : "Disconnect" }} to {{connectStatus}} , then the styling disappears. Update: Check this example code made by @Microsmsm: http:/

I created a service to handle modals, however when clicking content in a nested modal they only respond to their parent

好久不见. 提交于 2019-12-25 04:33:31
问题 Let me prefix by saying this a very similar to my other question seen here where I could not close any nested modals. The issue was from my service creating the same instance of a modal where 'The second instance "overwrites" the first one', so my solution was to create separate instances using $scope.modalA = modal; and $scope.modalB = modal; and I could still use my service to handle modals, seen here: .service('ModalService', function ($ionicModal, $ionicLoading, $rootScope) { var init =

Ionic Framework does not show Google Maps

与世无争的帅哥 提交于 2019-12-25 04:33:31
问题 I'm trying to learn Ionic Framework and I'm stuck on Google Maps part. I have been simply trying to display a map on the screen but instead I see a white screen. Any help will be appreciated! Here is my index.html code: <!DOCTYPE html> <html ng-app="app"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>YOE</title> <link href="lib/ionic/css/ionic.css" rel="stylesheet"> <link href="css/style.css" rel=

Ionic Routing and Template not working

℡╲_俬逩灬. 提交于 2019-12-25 04:31:49
问题 I am new to Ionic and Angular UI also. I am trying to use templates to load my first page in my Ionic app. My folder structure is as following. I want to use my index.html as the container for all my templates. I am trying to use list.html as the template the loads into the index.html when my app first loads. I have tried the following code and I am stuck. .config(function($urlRouterProvider, $stateProvider){ $stateProvider .state('index', { url: '/', abstract: true, templateUrl: 'index.html'

Ionic pass array value from page to another page

假装没事ソ 提交于 2019-12-25 04:27:19
问题 I'm new to Ionic and I'm developing a demo which contains two pages. The first page contains a form which contains 3 fields. All these values from the three inputs are stored in a array. I want to display the array in table format in the second page but I'm not able to do it. How can I display the array in the second page? Page one: Page two: Page one HTML: <form class="form-horizontal" role="form"> <div class="form-group"> <label class="control-label col-sm-2" for="email">Name:</label> <div