Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49339 articles
Browse latest View live

Show/Hide LoadingController while making network calls

$
0
0

@leorjoseph wrote:

I would like to present LoadingController before making a network calls and dismiss them after the call is complete. I have tried using the below code but am getting the error as

this.loadingProgress : any

constructor(public navCtrl: NavController, 
    public navParams: NavParams,
    public loadingCtrl: LoadingController,
    public networkProvider: NetworkProvider) {
      this.loadingProgress = this.loadingCtrl.create({
        content: 'Please wait...'
      });
  }
saveChanges() {
this.networkProvider.updateChanges(function() {
      this.loadingProgress.dismiss();
    },function(){
      this.loadingProgress.dismiss();
    });
}

undefined is not an object (evaluating '_this.loadingProgress'

can anyone help me with this ?

Posts: 1

Participants: 1

Read full topic


This is my console ,i need to display all these item onto screen, what should i do,please help

Create custom NPM Package. its not work in ionic project

$
0
0

@sanandiyavipul wrote:

Here I create one NPM custom package for requirements it’s successfully installed on my ionic project. and this is the first time in my experience I have build NPM custom package.
My issue is when I try to import it like import * as CustomNpm from 'CustomNpm'; it gives me an error that “Can’t find module CustomNpm”.

Then how can I import my custom package in ionic(ionic-3) project and any code required in NPM class export?

Thank you in Advance.

Posts: 1

Participants: 1

Read full topic

Canvas to image base64togalary how to get url and name of the saved canvas?

$
0
0

@sedar wrote:

i am saving canvas to image with base64togalary , while the time of saving i need to get the saved file name and location url ,how to do this?

  var dataUrl = this._CANVAS.toDataURL();//.split(';')[0].match(/jpeg|png|gif/)[0];//replace( /data:image\/png;base64,/, '' );;
    console.log(dataUrl);
    dataUrl = dataUrl;
 this.androidPermissions.requestPermissions([this.androidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE]).then(() => {
      this.base64ToGallery.base64ToGallery(dataUrl, { prefix: '_img' }).then(
        res => console.log('Saved image to gallery ', res),
        err => console.log('Error saving image to gallery ', err)
      );

    });

Posts: 1

Participants: 1

Read full topic

Social Sharing Plugin Support ios11 or not?

Looking for Ionic 3 Generalist well versed with the complete App cycle from UI to Deployment

$
0
0

@raysiti wrote:

Looking for an experienced, cost effective freelancer / small agency who could pick up small e-commerce / portfolio applications to be done using Ionic 3.
Web App knowledge in Angular JS is a definite plus.
This could be full time / part-time / flexible / on-location job as per your qualification and preference.

Please forward your resumes and portfolio to queries@raysiti.com.

Thanks,
Ananth
RAYSITI

Posts: 1

Participants: 1

Read full topic

Drawing on image on signature-pad task complete but image display size problem

$
0
0

@umeshionic1234 wrote:

hello everyone…am making one application in which task is …drawing on image so i use signature -pad and on signature-pad am setting image(taking through camera ) …am able to draw on image …but now problem is that image display from camera is too small and not equal to signature-pad canvas size…so am trying to changing the size of image but image size not changed please …help me to solve above problem

my signature.ts file code

import { Component, ViewChild, Renderer } from '@angular/core';
import { NavController} from 'ionic-angular';
import {SignaturePad} from 'angular2-signaturepad/signature-pad';
import { Platform } from 'ionic-angular';
import {HomePage} from '../home/home';
import { Camera, CameraOptions } from '@ionic-native/camera';
import { Diagnostic } from '@ionic-native/diagnostic';
import { FilePath } from '@ionic-native/file-path';
import { ToastController } from 'ionic-angular';
import { ImageViewerController } from 'ionic-img-viewer';

@Component({
  selector: 'page-signature',
  templateUrl: 'signature.html',
})
export class SignaturePage {
  @ViewChild(SignaturePad) public signaturePad : SignaturePad;
  //_imageViewerCtrl: ImageViewerController;
 
  public photos : any;
  base64Image:any;
 //public tempPath:string;
  lastImage;
  imagePath;
  selectedImagePath;
  targetWidth :400;
  targetHeight:400;
  // currentColour: string = '#1abc9c';
  //   availableColours: any;
  // width: 5000;
  //     height: 5000;
  // width: 1280;
  // height: 1280;
  //prototype: any

 //340
//200
  // canvasElement: any;
  // CANVAS_width= 500;
  // CANVAS_height= 700;

  public signaturePadOptions : Object = {
    'minWidth': 2,
    'canvasWidth': 340,
    'canvasHeight': 200,
     'quality': 100,
     'penColor': "rgb(66, 133, 244)",
    

    //sourceType:sourceType,
      // destinationType: DestinationType,
      'destinationType': this.camera.DestinationType.DATA_URL,
      'saveToPhotoAlbum': true,
      'correctOrientation': true,
      //mediaType: 2
      'encodingType': this.camera.EncodingType.JPEG,
      'mediaType': this.camera.MediaType.PICTURE,
      'allowEdit' : true,
      'targetHeight':800,
      'targetwidth' :800,
      // 'width': window.screen.width,
      // 'height': window.screen.height,
      // 'width': 5000,
      // 'height': 5000,
      
  };
 public signatureImage : string;
 public tempPath : string;
  constructor(public navCtrl: NavController,private camera : Camera,public renderer: Renderer,private diagnostic: Diagnostic,public platform:Platform,private filePath: FilePath,private toastCtrl: ToastController,imageViewerCtrl: ImageViewerController) {
    //this._imageViewerCtrl = imageViewerCtrl;
    
  }

   //Other Functions
   ngAfterViewInit() {
    console.log("signature on conole");
    this.signaturePad.clear();
   // this.canvasElement = this.canvas.nativeElement;
    this.canvasResize();
  //  this.drawComplete();
    
   }
   ngOnInit() {
    this.photos = [];
  }

  drawCancel() {
    this.navCtrl.push(HomePage);
  }

   drawComplete() { 

    this.tempPath = this.signaturePad.toDataURL();
    console.log(this.tempPath);
    this.navCtrl.push(HomePage, {tempPath: this.tempPath});

  }

  drawClear() {
    this.signaturePad.clear();
  }

  canvasResize() {
    let canvas = document.querySelector('canvas');
   
    this.signaturePad.set('minWidth', 1);
    this.signaturePad.set('canvasWidth', canvas.offsetWidth);
    this.signaturePad.set('canvasHeight', canvas.offsetHeight);
  }

  public  takePicture(sourceType, DestinationType) {
    var options = {
      quality: 100,
      
      //sourceType: sourceType,
      // destinationType: DestinationType,
      destinationType: this.camera.DestinationType.DATA_URL,
      saveToPhotoAlbum: true,
      correctOrientation: true,
      //mediaType: 2,
      encodingType: this.camera.EncodingType.JPEG,
     mediaType: this.camera.MediaType.PICTURE,
     // allowEdit : true,
      //height:100,
      //width:200,
     
      targetWidth :1000,
      targetHeight:1000,
     
     
    };


    this.camera.getPicture(options).then((imagePath) => {
      if (this.platform.is('android') && sourceType === this.camera.PictureSourceType.PHOTOLIBRARY) {
        this.filePath.resolveNativePath(imagePath)
          .then(filePath => {            
            this.lastImage = this.createFileName();           
            this.tempPath = "data:image/jpeg;base64," + imagePath;
            this.selectedImagePath = imagePath;
           
          
          });

      } else {
       
        this.lastImage = this.createFileName();
       this.tempPath = "data:image/jpeg;base64," + imagePath;
      
     this.selectedImagePath = imagePath;
     this.signaturePad.fromDataURL(this.tempPath);
      }
    }, (err) => {
   
     console.log(err);
    });
    
  }

  private createFileName() {
    var d = new Date(),
      n = d.getTime(),
      newFileName = n + ".jpg";
    return newFileName;
  }
    
      perform()
      {
        var data = this.signaturePad.toData(); 
        if (data) {
        
          data.pop(); // remove the last dot or line
         this.signaturePad.fromData(data);
      }
      
      
    }
     
 
  }

my signature.html file code

signature

<signature-pad [options]=“signaturePadOptions” id=“signatureCanvas” >


.csss file code
page-signature {
signature-pad {
canvas {
border: dashed 1px #cccccc;
//width: 100%;
//height: 350px;
// width: 100%;
height: 300px;
width: 80%;
margin-left: 20px;
position:fixed;
// top:2;
//margin-bottom:100px;
margin-top:50px;
//left:2;
}

      }
      
      .ram{
       // position:fixed;
          margin-top: 28px;
          height:300px ;
          width:92%;
          margin-left: 12px;
          //margin-bottom: 2px;
      }
      .ghi
{
   // position: fixed;
    //bottom: 0;
    // top:10;
   margin-top:17;
    left:0;
    bottom: 2;
   // height:400px ;
}
.sendbox
{
  position: fixed;
    //bottom: 20px;
   margin-bottom:15px;
   margin-top: 50px;
  //margin-left:2px; 
  //margin-right:0px;
}
// .slide-zoom {
//     background: #e6e6e6;
// }

// ion-slide.swiper-slide {
//     left: 25%;
// }
// // .thumb-img {
// //     padding: 10px;
// // }

}

please help me to solve this small size image display problem

Posts: 1

Participants: 1

Read full topic

Deleting a user

$
0
0

@uddyvky wrote:

I’m making a app so I want the admin to have the options to create a user and delete a user. The create user part is done but how do I delete a user??
I’m using rest api(php).

Posts: 1

Participants: 1

Read full topic


Multi Calling API for group chat and video?

Autosize ion-textarea

$
0
0

@bbarascou wrote:

Hi,

I’m trying to auto-adjust the height of a text area using this directive: Here
It’s works when i manually type in the text area but if i add a button to set a multiline text into the text area, the height won’t adjust automaticaly.

How can I handle it ?

Thank you

Posts: 1

Participants: 1

Read full topic

Hold content from showing until XML is loaded?

$
0
0

@jelliform wrote:

Hiya!

So I got an XML to load right at the start of an app, and the general design needs data from said XML to keep the design consistent; for example: the color of a button.

So the XML is loaded like this:

constructor (){
   this.http.get('assets/data/sectionColors.xml')
      .map(res => res.text())
      .subscribe((data)=>
      {
         this.parseXML(data)
         .then((data)=>
         {
            this.sectionColors = data;
            console.log(this.sectionColors);
         });
   });
}

parseXML(data){
    return new Promise(resolve =>
    {
       var k,
        arr    = [],
        parser = new xml2js.Parser(
        {
            trim: true,
            explicitArray: true
        });

        parser.parseString(data, function (err, result)
        {
            var obj = result.sectionColors;
            for(k in obj.section)
            {
               var item = obj.section[k];
               arr.push({
                  id		: item.id[0],
                  color    : item.color[0]
               });
            }

            resolve(arr);
         });
      });
   }

Note that the constructor calls parseXML and then assigns the any variable sectionColors with the result of the parsing.

And if I want to change the color of a button in the HTML, I go:

<button [style.background]="sectionColors[0]">Press Me!</button>

I get an error seemingly because the XML data hasn’t been loaded by the time I’m showing the page. So, is there a way to hold the page from showing until the XML has been parsed? Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Working offline mode, + synchronization (ionic 3)

$
0
0

@pierreLitto wrote:

Hi everybody,
I am developing an app in ionic3 framework and i want to use PostgreSQL as database. I want to work my app on offline (sqlite) and sync the data to my database.I found PouchDB which works as a local storage and sync with CouchDB(NoSQL solution) . there is any other local storage which work offline and sync with postgresql data base ?, (documentation,tutorials,…)

Posts: 3

Participants: 2

Read full topic

Push notification ionic 3

$
0
0

@m7md-Abdulghani wrote:

Hello everyone

I am stuck now with push notification in ionic and all tutorials that I have seen are explaining push notification using Firebase. My question is that it is necessary to use firebase even if my backend language is not firebase? Means that the configurations for firebase will be the same with all different backend languages?

Hope it is clear

Posts: 1

Participants: 1

Read full topic

It possible to make this JavaScript to Typescript?

$
0
0

@guneekieng wrote:

this code as a .js I want this to work on .ts

document.getElementById(‘container’).appendChild(

slides.reduce((fragment, svg, i) => {
    const span = document.createElement('span');
    span.innerHTML = `
                <p>${slideNames[i]}</p>
                <div>${svg}</div>
            `;

    fragment.appendChild(span);
    return fragment;
}, document.createDocumentFragment())

);

Anyone can help me to solve this problem?
I have no idea to make it.
Thanks.

Posts: 1

Participants: 1

Read full topic

Ionic cordova run android --prod not working properli

$
0
0

@shijintr wrote:

I have installed ion2-calendar in my ionic application using npm install ion2-calendar moment --save and i have made some changes on its files located in node_modules/ion2-calendar/dist/components/month.component.js, i have added (panEnd) and (panStart) in its dates.it is working good using ionic serve and ionic ocrdova run android.but the events are not working when we make build usinng --prod option like

ionic ocrdova run android --prod
the build was successfull and we can run the app on mobile,but the added event does not works.is there anything we need to do to add this changees in production build?

Posts: 1

Participants: 1

Read full topic


Suddenly chrome showing blank page when debugging?

$
0
0

@saty932 wrote:

showing this error

Not allowed to load local resource: file:///android_asset/www/assets/icon/favicon.ico

Posts: 1

Participants: 1

Read full topic

How to get Ionic checkbox value?

$
0
0

@uddyvky wrote:

I load the User Id from the database(rest api) and then I used ion check box to select the user whom i want to delete but as I have all the users param same i.e uid, when I use ngmodel to get the value of the selected item all the items are selected just because of “uid”. So how can i select only one user and get the uid value??
below is my code:

<ion-header>

  <ion-navbar>
    <ion-title>Delete User</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <div *ngFor="let obj of response1Obj; let i = index">
    <ion-item>
      <ion-label>User ID: {{obj.uid}}</ion-label>
      <ion-checkbox [(ngModel)]="uid" color="Royal"></ion-checkbox>
    </ion-item>
  </div>
  <div>
    <button ion-button (click)="delUser();" style="text-align:center;">Delete</button>
  </div>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Looking for a doc about Ionic components used in PWA Toolkit

$
0
0

@gilhardl wrote:

Hi everybody,

Does someone knows where can I found a doc about Ionic components which are used in Ionic PWA Toolkit ?

I just start an experimental app using Stenciljs and Ionic PWA Toolkit with Josh Monory tutorial (https://www.joshmorony.com/building-a-pwa-with-stencil-an-introduction-to-stencil/) and I see than Ionic components doesn’t exactly works like in ionic-angular.

For exemple, in Ionic we use :

<ion-buttons end> ... </ion-buttons>

and in Stenciljs we use :

<ion-buttons slot="end"> ... </ion-buttons>

and my problem is that I don’t know where can I found any doc which explain, for example, that in Stenciljs “if you want to specify ion-buttons position, you need to put “slot” attribute where the attribute’s value is the position”

Thanks
Lucas GILHARD

Posts: 2

Participants: 2

Read full topic

Is application version can be increased automatic?

$
0
0

@_Ali94 wrote:

I’m asking if there is any way to enable thing that increase the application version automatic better than manual (by edit it JSON file)?

as usual I edit the version before generate and upload the application on store, but now I think maybe there is a easier way that save my time and did this job automatic !

Posts: 1

Participants: 1

Read full topic

Use framework css Tailwind in Ionic 3

Viewing all 49339 articles
Browse latest View live


Latest Images

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