Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71057 articles
Browse latest View live

Using FirebaseArray to signup and login

$
0
0

@burhanshakir wrote:

Hi Everyone, I am pretty new to Angular. I was trying to create a simple login and sign up page in the ionic creator. When I am signing up I take name, email, and password and I am uploading it to my real-time database. To get the data I use a firebasearray. This works and I am able to get the data as well as upload it, but the problem I am facing is I am unable to parse the firebasearray to check if the current email currently exists in it or not. I tried for each loop and tried with firebase functions like getRecord and keyAt. Nothing seems to work, any help would be appreciated!

Posts: 1

Participants: 1

Read full topic


Ionic and ACF Repeater field

$
0
0

@saeba wrote:

Hi,
I’m new with ionic and angular.
I have a wordpress site with ACF Pro plugin and i have created an app who works fine.
I can display simple ACF fields, but i don’t know how to display all sub_fields of an ACF repeater field.
Anyone can help me ?

Posts: 1

Participants: 1

Read full topic

IOS webpackJsonp / 'const' / viewport-fit / vendor.js

$
0
0

@marcosvsgouvea wrote:

Hey Guys I’m having an issue building my App for IOS

My App Builds Successfully on Ionic, and on Xcode. After the Splash Screen the App don’t go further it stops because these js errors

This Error only happens on Device, it do not happen on emulator.

thats what coming on my Safari console

[Error] Viewport argument key "viewport-fit" not recognized and ignored. (index.html, line 9)
[Error] SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
	(anonymous function) (vendor.js:1)
[Error] ReferenceError: Can't find variable: webpackJsonp
	Global Code (main.js:1)

Thats my HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8">
  <title>Easy Change</title>
  <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
  <link rel="manifest" href="manifest.json">
  <meta name="theme-color" content="#4e8ef7">

  <!-- add to homescreen for ios -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">

  <!-- cordova.js required for cordova apps (remove if not needed) -->
  <script src="cordova.js"></script>

  <!-- un-comment this code to enable service worker
  <script>
    if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('service-worker.js')
        .then(() => console.log('service worker installed'))
        .catch(err => console.error('Error', err));
    }
  </script>-->

  <link href="build/main.css" rel="stylesheet">

</head>
<body>
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en"></script>
  <!-- Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- The vendor js is generated during the build process
       It contains all of the dependencies in node_modules -->
  <script src="build/vendor.js"></script>

  <!-- The main bundle js is generated during the build process -->
  <script src="build/main.js"></script>

</body>
</html>

thats my INFO

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.10
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2 
    Node       : v8.11.1
    npm        : 5.6.0 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

package.json

{
  "name": "myApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "^5.2.11",
    "@angular/common": "^5.2.11",
    "@angular/compiler": "^5.2.11",
    "@angular/compiler-cli": "^5.2.11",
    "@angular/core": "^5.2.11",
    "@angular/forms": "^5.2.11",
    "@angular/http": "^5.2.11",
    "@angular/platform-browser": "^5.2.11",
    "@angular/platform-browser-dynamic": "^5.2.11",
    "@angular/platform-server": "^5.2.11",
    "@angular/router": "^5.2.11",
    "@ionic-native/action-sheet": "4.9.0",
    "@ionic-native/background-mode": "4.9.0",
    "@ionic-native/barcode-scanner": "4.9.0",
    "@ionic-native/camera": "4.9.0",
    "@ionic-native/clipboard": "4.9.0",
    "@ionic-native/contacts": "4.9.0",
    "@ionic-native/core": "4.9.0",
    "@ionic-native/crop": "4.9.0",
    "@ionic-native/device": "4.9.0",
    "@ionic-native/facebook": "4.9.0",
    "@ionic-native/fingerprint-aio": "4.9.0",
    "@ionic-native/geolocation": "4.9.0",
    "@ionic-native/google-plus": "4.9.0",
    "@ionic-native/ionic-webview": "^5.0.0-beta.11",
    "@ionic-native/sms": "4.9.0",
    "@ionic-native/social-sharing": "4.9.0",
    "@ionic-native/splash-screen": "4.9.0",
    "@ionic-native/status-bar": "4.9.0",
    "@ionic/pro": "1.0.20",
    "@ionic/storage": "2.1.3",
    "angular2-qrcode": "^2.0.1",
    "angularfire2": "^5.0.0-rc.11",
    "brmasker-ionic-3": "^1.1.0",
    "cordova-clipboard": "^1.2.1",
    "cordova-ios": "4.5.4",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-add-swift-support": "^1.7.2",
    "cordova-plugin-background-mode": "^0.7.2",
    "cordova-plugin-camera": "^4.0.3",
    "cordova-plugin-contacts": "^3.0.1",
    "cordova-plugin-crop": "^0.4.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-facebook4": "^2.2.0",
    "cordova-plugin-fingerprint-aio": "^1.3.8",
    "cordova-plugin-geolocation": "^4.0.1",
    "cordova-plugin-googleplus": "^5.3.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.1.19",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "^5.4.1",
    "cordova-sms-plugin": "^0.1.11",
    "es6-promise-plugin": "^4.2.2",
    "firebase": "^5.1.0",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "moment": "^2.22.2",
    "otplib": "^8.0.1",
    "phonegap-plugin-barcodescanner": "^8.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.10",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-actionsheet": {},
      "cordova-clipboard": {},
      "cordova-plugin-fingerprint-aio": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-x-socialsharing": {},
      "phonegap-plugin-barcodescanner": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-contacts": {},
      "cordova-plugin-device": {},
      "cordova-plugin-crop": {},
      "cordova-plugin-googleplus": {
        "REVERSED_CLIENT_ID": "123456.apps.googleusercontent.com"
      },
      "cordova-plugin-facebook4": {
        "APP_ID": "123456",
        "APP_NAME": "myApp"
      },
      "cordova-sms-plugin": {},
      "cordova-plugin-background-mode": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "ios"
    ]
  }
}

Posts: 2

Participants: 2

Read full topic

Can someone explain how to use the deploy feature in Pro?

$
0
0

@omicr0n wrote:

so as mentioned can someone explain in more layman’s terms how pro deploy feature works in the sense of what versions do I need to update where when I want to push a change and then if I push another change do I always have to use and set the versioning for the builds on the website?

From the video on the page about deploy it makes it out that you don’t need to update your apps version when you want to push to change but I was having problems with it not updating to newer pushed code to a channel and such but then switched to updating version number and pushing to a channel and using the native versioning functioning and setting it for the that commits build then manually deploying that build to the channel that deploy looks at to update but that just made things even more confusing…

Because you have your version in package.json, one in config.xml, there’s an appVersion property you pass into pro.init, then you have your binary version at the time the app was built, then you have all the native versioning stuff on the site where you can set min/max/equiv native versions for a build when you deploy on whether it should update.

But nothing really explains how to use all that together… for example if you start using the native versioning feature on the site to tell deploy if it should download or not download this update then I assume you have to set that every time you want to push a new update?

Posts: 1

Participants: 1

Read full topic

Sample of Ionic Native $cordovaPush on v1?

$
0
0

@danieltoptal wrote:

Hi guys, I’m trying to use ionic native 2.x on my ionic-v1 app, but I’m having trouble setting up the notification plugin.

I was using ngCordova before, but want to use Ionic Native now, since ngCordova is deprecated.

Does someone have Push working on this scenario to share a sample piece of code for initializing the Push plugin and binding with the proper events?

Thanks a lot!

Posts: 1

Participants: 1

Read full topic

Inserting HTML for Slides from Typescript File

$
0
0

@jqx23 wrote:

I have code in my ts file that puts most of the html code for slides I have into a string(I need to do this because I have to traverse through an object recursively and I’m layering images on svg’s and need to transform them). So this function would generate a large string that looks like

<ion-slides>
  <ion-slide>
    <svg ...>layers of images</svg>
  </ion-slide>
  <ion-slide>
    <svg ...>layers of images</svg>
  </ion-slide>
  <ion-slide>
    <svg ...>layers of images</svg>
  </ion-slide>
</ion-slides>

When I paste this code into the html file, the slides work perfectly, but when I put the string into a div and setting its innerHTML like so

  ionViewDidLoad(){
    document.getElementById('div').innerHTML = this.htmlstring;
  }

the slides appear as a list of images instead of as slides and when I put them inside the ion-content groups, setting the innerHTML to the string just results in an image list as well except I can’t even scroll through it, instead of slides.

Is there any way to fix this?

Posts: 1

Participants: 1

Read full topic

TypeScript Object Help

$
0
0

@saimonventura wrote:

I have the code:

let linha = { quantidade: 1 };
let coluna = [];

coluna.push(linha);
coluna.push(linha);

coluna[0].quantidade++;

console.log(coluna);

alert(coluna[0].quantidade + ' ' + coluna[1].quantidade);

result:
coluna[0].quantidade = 1;
coluna[1].quantidade = 1;

expected
coluna[0].quantidade = 1;
coluna[1].quantidade = 0;

how can I make this?

Posts: 1

Participants: 1

Read full topic

Want to integrate gps with live location in car booking app

$
0
0

@jdpsahjaideep wrote:

I want to integrate the gps with live location in a map from starting point to end point in the agularjs with ionic 1 project.

Posts: 1

Participants: 1

Read full topic


Why tab-button id keep changing?

$
0
0

@cikcoh wrote:

Hi,
I want to change style of specific tab-button in the ion-tab tag
So when i inspect the code, i found this with id id="tab-t0-1"

<a class=“tab-button has-icon icon-only disable-hover” href="#" role=“tab” ng-reflect-tab="[object Object]" id=“tab-t0-1” aria-controls=“tabpanel-t0-1” aria-selected=“false”>

Then I managed to change the style using the id. But the problem is every time i navigate back to TabsPage from side menu link or back button, i notice that that id will keep changing,so the style no longer work.

Posts: 1

Participants: 1

Read full topic

How to post multiple input fields to server as a json object

$
0
0

@sreejith13 wrote:

Hai there,
Iam relatively new to the ionic app development.
Now i am face a problem that,i need to send multiple input field which generate dynamically from the mysql php.
ie, i have a input field which i can be updated and send to the server that is my requirement.

Now i am able to get data from my server and generate the input field.but iam unable to send the (updated if any) to the server back

here is the screenshot.

here is html template

type or paste code here
```  `<ion-list>
  <ion-item no-margin="">
  <ion-grid>
    <strong><ion-row>
      <ion-col>Student code</ion-col>
      <ion-col>name</ion-col>
      <ion-col>phone</ion-col>
    </ion-row>
    </strong>
  </ion-grid>
  </ion-item>
  <ion-grid>
    <ion-row *ngFor="let student of students">
      <ion-col >{{student.student_code}}</ion-col>
      <ion-col>{{student.full_name}}</ion-col>
      <ion-col ion-item=""><ion-input  maxlength="10" required [(ngModel)]="student.phone"></ion-input></ion-col>
    </ion-row>
  </ion-grid>
</ion-list>`


here is the .ts file

loadStudents(division){
this.rest.loadStudents(division)
.subscribe(data=>{
this.students=data;

  },error1 => {
    console.log(error1);
  });

}

Posts: 1

Participants: 1

Read full topic

Function inside ionic icons not working

$
0
0

@arjunramdas123 wrote:

I’m trying to scan barcode by clicking barcode icon inside input field ,but it’s not working ,when i place the function in button only without icon then works perfectly.


<ion-item *ngIf='item.type == "barcode"'>
         <ion-label  floating><b>{{item.label}}</b></ion-label>
             <button item-right clear (click)='scanBarCode(item.key)'>
                 <ion-icon name="barcode"></ion-icon>
             </button>
           <ion-input type="text" (ngModel)= "formssdata[index].key" name={{item.key}} value={{item.value}} ></ion-input> 
        </ion-item>

TS

 scanBarCode(key) {
    this.barcodeScanner.scan().then(barcodeData => {

      for(var i=0;i<this.formssdata.length;i++){

        if(this.formssdata[i].key == key){
         
           this.formssdata[i].value = barcodeData.text;
           break;

       }
    }

    }, (err) => {
        console.log('Error: ', err);
    });
  }

Posts: 1

Participants: 1

Read full topic

Ionic native and environment setup

$
0
0

@icchio wrote:

Hello,
I’m experiencing a problem trying to use Firebase plugin and push plugin.
The error is Plugin_not_installed.
Trying to found solution on internet I realized that can be a generic error which can also come from incorrect versions of ionic etc…
Also using this plugins i get warning during ionic cordova build ios…

(node:16616) UnhandledPromiseRejectionWarning: xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance

and after build and run on xcode the app crash on simulator at this line

int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");

my ionic infos are

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.10
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v9.11.1
    npm  : 5.6.0 
    OS   : macOS High Sierra

If someone is using firebase or push can post is ionic info…so i can start from something that i know is working =)

If you have others ideas about this problem or need other infos to try understand…please let me know!

Thank you

Posts: 1

Participants: 1

Read full topic

Accessing a directive function from a component page

$
0
0

@AUone wrote:

Hi,
I’m VERY new to Ionic and haven’t used JS in years, so please forgive my ignorance… Your help over a current hurdle will be much appreciated.
I have a listVIew in a page where I’m trying to format a date/time for each item where the format is sensitive to the current time. So, for instance - as with email systems - if the item is timed within the past few minutes, it’s “time” is stated as “Now” whereas it is today, it is formatted as the time, whilst it is older, its format changes to the date (with no mention of the time). I have written a function that I’ll be wanting to call from several listView’s located in several different pages, so I gather that it could be best to set this up as a ‘directive’.
Thus I have set up the following…
import { Directive } from ‘@angular/core’;
import * as moment from ‘moment’;

@Directive({
selector: ‘[refresh-dates]’,
host: {
‘(ionScroll)’: ‘displayDate($dateStamp)’
}
})
export class RefreshDatesDirective {

dateStamp: any;

constructor() {
console.log(‘Hello RefreshDatesDirective Directive’);
}

displayDate(dateStamp: any) : string {
// if the item is datestamped as having occured some time in the future
if(this.dateStamp > moment()) {
return “Error”;
// if the item is datestamped within the past 5 mins
} else if(this.dateStamp > moment().subtract(5, ‘minutes’)) {
return this.dateStamp.fromNow(); // else “Now”?
// else if datestamped today
} else if(this.dateStamp > moment({hour: 0, minute: 0, seconds: 0})) {
return this.dateStamp.format(‘LT’); // “3:10 AM”
// else if datestamped yesterday
} else if(this.dateStamp > moment({hour: 0, minute: 0, seconds: 0}).subtract(‘days’, 1)) {
return “Yesterday”;
// else if datestamped this past week
} else if(this.dateStamp > moment().subtract(‘days’, 7)) {
return this.dateStamp.format(‘ddd, LT’); // “Thurs, 3:10 AM”
// else if datestamped this year
} else if(this.dateStamp.format(‘YY’) == moment().format(‘YY’)) {
return this.dateStamp.format(‘Do MMMM’); // “4th July”
} // else the item is datestamped as not having occurred this year
return this.dateStamp.format(‘Do MMMM YYYY’); // “4th July 2017” */
}
}

I’ve also added the following import into app.module.ts
import { RefreshDatesDirective } from ‘…/directives/refresh-dates/refresh-dates’;

@NgModule({
declarations: [
MyApp,
RefreshDatesDirective
],

In my page, I’ve made ion-content reference the directive

…and have then tried calling displayDates() by way of {{displayDate(item.dated)}} but how do I get it to refer / connect to the directive?

TIA.

Posts: 1

Participants: 1

Read full topic

How to Integrate paytm payment gateway in IONIC 3

Tabs dissapear when pushing page

$
0
0

@notified2 wrote:

When i start my app i want to go to a loginpage to see if the user is logedin or not.
I don’t want my loginpage to be part of the tabs, but since i have been stuck here for a while i have now included the loginpage in my tabs. My problem is when i go to the loginpage and then login/find out im already authed i want to push a new page and that works fine but when i end up on that new page my tabs have dissapeared. If i save my site and let android studio refresh my virtual device then my tabs appear again.

This is what my tabs looks like:

<ion-tabs selectedIndex= {{index}} >
    <ion-tab [root]="login" hidden></ion-tab>
    <ion-tab [root]="favourites" tabIcon="search"></ion-tab>        
    <ion-tab [root]="channels" tabIcon="star"></ion-tab>
    <ion-tab [root]="settings" tabIcon="settings"></ion-tab>
</ion-tabs>

On loginpage ngOnInit() i have this:

 if (this.authenticationService.isLoggedIn()) {
           this.navCtrl.push(ListenComponent,
                    { index: "1"
                });  
        }

So if the user is loggedin it will push listencomponent right away. This works as expected and the user ends up in ListenComponent but now the tabs is missing.

In my listencomponent.html

<ion-header>
    <ion-navbar>
    </ion-navbar>
</ion-header>
<ion-content>
</ion-content>

When the page has been refreshed everything works as expected. Then i can go between the tabs and i can also push child components. I have already tried to setRoot and PopAll etc etc.

Posts: 1

Participants: 1

Read full topic


App not installed code -22 reason other

Chat UI in ionic 3

$
0
0

@rajbasilio wrote:

I have tried to create a chat UI. I’m having the trouble with the placement of chat bubbles. It is as
msg%20bub

This is my HTML code

<ion-list no-lines class="msgbubble" *ngFor="let msg of messages">
    <div class="innermsg left" *ngIf="userId != msg.id">
      {{ msg.reply }}
    </div>
    <div class="innermsg right" *ngIf="userId == msg.id">
        {{ msg.reply }}
    </div>
</ion-list>

This is my scss code

.innermsg {
        display: inline-block;
        padding: 5px 10px;
        margin: 5px;
        font-weight: 500;
        font-size: 16px;
        border-radius: 15px;
        margin-bottom: 5px;
    }

    .innermsg.left {
        float: left;
        background-color: #F1F0F0;
        color: black;
    }

    .innermsg.right {
        float: right;
        //margin-right: 10%;
        background-color: #0084FF;
        color: white;
    }

    .msgbubble {
        margin-bottom: 10px;
    }

Can someone help me in displaying chat bubbles on after the another, but not in the same line as shown in above picture.

Posts: 1

Participants: 1

Read full topic

Ionic 3 Cordova plugin gives undefined error

$
0
0

@deanwilliammills wrote:

Hi

I added a Cordova plugin from GitHub, which is not part of the ionic-native plugins. So plug does show under the list of plugins, so it has been added successfully, but when I call a method from the plugin, I get this error:

ReferenceError: CustomPlugin is not defined

Here is my code:

import { Component, OnInit } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;

declare var CustomPlugin: any;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage implements OnInit {

constructor(public navCtrl: NavController) { }

ngOnInit() {

CustomPlugin.initialise(function () {

  CustomPlugin.setReceiveScanCallback(function (data, type) {
    console.log("scan received: " + data + "(" + type + ")");
  });

});

}

scanBarcode() {

CustomPlugin.requestScan(function () { });

}
}

Posts: 1

Participants: 1

Read full topic

Help please ....What should i do

Gmail API in Ionic 2

$
0
0

@anjanimantri wrote:

Hi, I want to send an email to particular destination mail address from my app without opening any 3rd party application using google gmail API. Can you please help me with that?

Thanks

Posts: 1

Participants: 1

Read full topic

Viewing all 71057 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>