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

Cant serve project(exit code 13)

$
0
0

@altayyldz wrote:

Hi, i download project but cant serve it. getting an exit code 13. how can i solve this error? ( i try npm install)

Posts: 1

Participants: 1

Read full topic


Sign pdf with digital certificate

$
0
0

@diegocidm4 wrote:

I am trying to implement a solution to be able to sign documents with Ionic. Is there a library that allows you to sign a pdf with a digital certificate from IONIC?

Posts: 1

Participants: 1

Read full topic

Problems async method

$
0
0

@Yoyo31 wrote:

Hey all!

I hope you can help me, because I have some problems with the sequence of my functions (Firebase)
Note that I am a newbie (started development 3 weeks ago) and sorry for my bad english … :wink:

As you can see on the code below, I try to use async function with .then method. My function calls DB on Firebase, so some functions take longer to complete tasks.
I don’t understand why my function: SearchOrg() is finished after my function : Invitation() … while I specify to continue the code in .then …
I passed long time to try other methods as : await or Promise with function(resolve, reject) … but nothing succeeded.

async SearchOrg () {
        this.afDB.list('Attente/' + this.userID + '/Amis').snapshotChanges(['child_added', 'child_removed']).subscribe(actions => {
                   this.testUser = [];
                   console.log(this.userID);
                   actions.forEach(action => {
                   this.testUser.push(action.key); // payload.exportVal().Organisateur);
               });
               console.log(this.testUser);    // Displayed Last
            });
            return this.testUser;
 }


  async Invitation() {

  const test = await this.SearchOrg().then(() => {
      console.log(test);                                   // Displayed First
        if (test !== ' ') {
           this.MasterFlag = true;
           this.presentLoadingWithOptions();
        } else {
            this.Inviter = [];
            this.MasterFlag = false;
            this.afDB.list('Attente/' + this.userID + '/Organisateur').snapshotChanges(['child_added', 'child_removed'])
            .subscribe(actions => {
              actions.forEach(action => {
               this.Inviter.push(action.payload.exportVal().Organisateur);
              });
          });
      console.log(this.Inviter);                                // Displayed second
   }
  });
}

Many thanks for helps
BR
Yoann

Posts: 2

Participants: 2

Read full topic

Can I create an ionic v4 project with the latest CLI

$
0
0

@sebastienguillon1 wrote:

I would like to replicate an ionic 4 project without most of the dependencies to do some tests. So I need to create a blank Ionic 4 project with @ionic/angular v4.11.8.

How can I do this with the latest ionic CLI, or any other version?

Posts: 1

Participants: 1

Read full topic

Update user data in ionic

$
0
0

@Geelario wrote:

Good day everyone, Please I need your help on how to update a user data. I am new to angular and ionic. I have been able to retrieve user id from local storage, and also write a method that out the user new data, the problem I am having is how to update the user with the new data. This is my code below. Thanks.

// Update user info
  updateMethod(){

    // Retrieve user Id
    let isUserLoggedIn = localStorage.getItem('currentUserId');

    //this output user new info
    this.user = {
      first_name:this.user.first_name,
      last_name: this.user.last_name,
      username: this.user.username,
      email: this.user.email,
      billing: {
        phone: this.user.billing.phone,
        address_1: this.user.billing.address_1,
      }
   };
   console.log('new update', this.user);  
   //update user data
    this.WC.UpdateUser( isUserLoggedIn).then((data)=>{
         console.log('update successful', data);
       });

  }

Posts: 1

Participants: 1

Read full topic

Make a segment of ion-button or ion-chip

$
0
0

@shizi wrote:

Hello, guys !
I want to make a segment of clickable, ion-button or ion-chip like this:


The problem is how to enable the first button by default (checked) and how to change after click event, the background color of the default button, and change the background of the button who has just been clicked. Please help me. Thank you !
Here is my code:
                  <ion-col  *ngFor="let categorie of categoriesChip; let id = index">
                    <ion-button class="chip-btn"
                                [ngClass]="{'default': defaultActivate(id)}" 
                                (click) = "changeButton($event)"
                                fill="outline">
                      {{categorie.label}}
                    </ion-button`
                  </ion-col>
                </ion-row>

Here the typeScript code:

defaultActivate(id)  {

  		if(id === 0) {

  			return true;
  		}
  	}

Posts: 1

Participants: 1

Read full topic

Ion-content overlaps with ion-header

$
0
0

@kishorpawar wrote:

Following is my configuration.

Ionic:

   Ionic CLI                     : 6.6.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.26
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.0.0
   @capacitor/core : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 4 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1 (/Users/kishorpawar/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v12.12.0 (/usr/local/Cellar/node/12.12.0/bin/node)
   npm               : 6.11.3
   OS                : macOS Catalina
   Xcode             : Xcode 11.4.1 Build version 11E503a

this doc says as below

image

But still, my ion-content overlaps with ion-header .

I am trying this usage example with ion-virtual-scroll. I tried fullscreen, padding and other solutions on the forum including old ionic versions.

I have the following code in my app.component.html.

<ion-app>
    <ion-header [translucent]="true">
      <ion-toolbar>
        <ion-title size="medium">
          <ion-img [src]="header_logo" height="150" width='150'></ion-img>
        </ion-title>
      </ion-toolbar>
    </ion-header>

  <ion-router-outlet></ion-router-outlet>

and the ion-content is present in every component.

Posts: 1

Participants: 1

Read full topic

What is the best way to play audio at the moment?

$
0
0

@Ripper346 wrote:

Hi, I am writing a Ionic 5 + Angular app and using capacitor to build for android (and next to ios). I have to play some audio files (all stored in /src/assets folder) in certain moments. I tough it would be easy but after 3 days trying I am only more confused than before :sweat_smile:. If I am correct, there are 3 main ways to play an audio:

  1. HTML 5
let audio = new Audio('../../assets/audio/countdown/0.mp3');
audio.load();
audio.play();
  1. Native audio plugin with the latest update on 17 Apr 2017

  2. Media plugin that it’s active

I started with native audio but I had no luck (if I remember correctly I wasn’t able to provide a valid path) and since I saw that it wasn’t developed anymore I tried to go on media plugin. With media plugin, I made a simple button to test the play action, so I wrote in the component:

import { Media } from '@ionic-native/media/ngx';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage implements OnInit {
  constructor(private media: Media) { }

  start() {
    let zero = this.media.create(`cdvfile://localhost/assets/audio/countdown/0.mp3`);
    zero.setVolume(1);
    zero.play();
  }
}

It doesn’t work. From Android Studio running logs I have

V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: Media, action: create, actionArgs: ["98bc104d-bb37-3285-8a58-b87444470383","cdvfile:\/\/localhost\/assets\/audio\/countdown\/0.mp3"]
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: Media, action: setVolume, actionArgs: ["98bc104d-bb37-3285-8a58-b87444470383",1]
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: INVALID, service: Media, action: startPlayingAudio, actionArgs: ["98bc104d-bb37-3285-8a58-b87444470383","cdvfile:\/\/localhost\/assets\/audio\/countdown\/0.mp3",null]
W/AudioManager: Use of stream types is deprecated for operations other than volume control
    See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case

Thinking it was the path that was wrong I tried several times without success (cdvfile://, file:// or directly the path). Can anyone help me? Maybe I am missing something to import or to set, or maybe there’s a better way to do it, I don’t know at this point, I am fairly new to Ionic.

I had no problem with HTML 5 way but I read in this forum that it doesn’t work with background play so I wanted to implement with the cordova plugin.

Thank you.

Posts: 1

Participants: 1

Read full topic


Fit image to ion-card-content

$
0
0

@CrisDeveloper96 wrote:

How can I adjust an image to the size of ion-card-content. This is mi code:
HTML:


<ion-row *ngFor=‘let datos of data | filtros:textoBuscar’>
<ion-col *ngFor="let datosI of datos.datos " size=‘4’ >


<ion-img class=“home__imagen” [src]=“datosI.imagen”>





CSS:
ion-card-content.card__content.card-content-md {
padding-left: 0;
padding-right: 0;
padding-top: 0;
padding-bottom: 1px;
-webkit-padding-start: 0px;
padding-inline-start: 0px;
-webkit-padding-end: 0px;
padding-inline-end: 0px;
}

Posts: 1

Participants: 1

Read full topic

Not really an ionic question: sql/data backend recommendation?

$
0
0

@alexmehler wrote:

hey guys im developing an app for my startup company , its a mobile documentation system.

i got ionic down now , but right now the test version just saves to a json on the phone,

but i need a databackend which i can use to save the data from the app to , and i need to be able access it in office to easliy access and print the data to a template.

im pretty new to all this stuff , but i looked up the ionic native solutions and it seems i can only use them for local data … maybe some of you guys know a good solution which works through online servers and is a good fit …

i played with the idea to use google sheets as databackend???

any help is appreciated

Posts: 2

Participants: 2

Read full topic

Native Key

$
0
0

@commerca wrote:

Hello,

new to Ionic, got lose. i thought there is a Native Solutions version available that is supported by the community, it turns out i need to be an enterprise customer (not a just a cloud subscription).

now i need to build an app that requires an “Ionic Native Key” as per the link below, how can i get that key? any other way than paying as an enterprise customer? what’s the cost of an enterprise plan anyway?

P.S: i placed many requests to receive a key through a contact form with no success.
Thank you,

Posts: 1

Participants: 1

Read full topic

[native-run] ERR_UNKNOWN: Non-zero exit code from adb: 1

$
0
0

@SaeedAnsari wrote:

Hi I keep getting this error on ionic 5 using the Cordova production build

I have tried to remove and re-add the android platform but still nor working. My Android Studio is up to date. please can you help

Posts: 1

Participants: 1

Read full topic

We need an Ionic 3 + PhoneGap Build and directory structure /www

Admob banner ad (even the test ones) not visible in Ionic 4 Android app

$
0
0

@dogdogcatcat wrote:

I am trying to integrate Admob ads with my Ionic 4 (Angular) Android app. So, I installed the plugin by executing the following commands.

cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID=<..MY APP ID HERE...>
npm install @ionic-native/admob-free --save

After that, I put the AdmobFree service in the app.module and put the below things in the app.component.ts

 initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleLightContent();
      this.statusBar.backgroundColorByHexString('#4d4d4d');
      this.splashScreen.hide();
    });

    const bannerConfig: AdMobFreeBannerConfig = {
      isTesting: true,
      autoShow: true
    };
    this.admobFree.banner.config(bannerConfig);

    this.admobFree.banner.prepare()
      .then(() => {
      })
      .catch(e => console.log(e));
  }

Then I built the app following Ionic’s documentation. However, the test banner app is not appearing at all in the mobile device. What is possibly going wrong?

Posts: 1

Participants: 1

Read full topic

Using pages in multiple tabs

$
0
0

@Snoopa wrote:

Hi,

first of all sorry for my bad english.

I have some pages which represent a certain object. Now i want to use these pages in two tabs. Is there a way to do this without creating routes for every tab?

Let’s say i have the tabs ‘student’ and ‘techer’. These tabs have the routes /student/[…] and /teacher/[…].

Both should contain some pages to represent their personal infos (address, account-info,…).

If I put these pages under ‘/student/address, /student/account, […]’ and navigateForward from a ‘teacher’ page, the ‘ion-back-button’ doesn’t show up and the selected tab changes form ‘student’ to ‘teacher’.

If I put these pages under a own route ‘/personal-info/address, /personal-info/account, […]’ and navigateForward from a tab-page, all tabs disappear.

I hope you can understand my problem and help me.

Posts: 1

Participants: 1

Read full topic


Trusted Online Casino Review

$
0
0

@casino96slots wrote:

96Slots has Trusted Malaysia Online Casino. 96Slots is known for its services throughout the world. This gives you an easy and innovative way to play your favorite multi-touch slot game. With 96Slots, you don’t have to leave home to go to the casino and enjoy the same old-fashioned casino games. You can visit their website and see more online casino games’ review

Posts: 1

Participants: 1

Read full topic

Problem with ionic-tabs

$
0
0

@fabrizioV wrote:

Hi everybody,
i’m sorry for my english , he is not good !.
So my problem it’s with ionic-tabs.

I have Home , i click at the button connection, i enter my login and password after i redirect to my page tabs. but i’m not redirect to the page tabs with my children page account.

my app-routing.module contains

const routes: Routes = [
  { path: '', redirectTo: 'home', pathMatch: 'full' },
  { path: 'home', loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)},
  {path: 'inscription', component : InscriptionComponent},
  {path : 'connexion', component: ConnexionComponent},
 
  {
    path: 'tabs',
    loadChildren : './tabs/tabs.module#TabsPageModule'
  },

];

tabs-routing.module contains :

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children : [
      {
        path: 'compte',
        children:
            [
              {
                path: '',
                loadChildren: '../compte/compte.module#ComptePageModule'
              }
            ]
      }
    ],
  },
  {
    path : '',
    redirectTo : 'home',
    pathMatch : 'full'
  }
];

Compte contains :

const routes: Routes = [
  {
    path: '',
    component: ComptePage
  }
];```

thanks you !

Posts: 1

Participants: 1

Read full topic

Inserting data into a database using node js mysql

$
0
0

@NthabyMogoboya wrote:

This is my page.ts file. I want to insert the data to a database but it write “null” instead of the actual values. How can i correct it?

constructor(public http:HttpClient,public platform:Platform, public activatedRoute: ActivatedRoute, private formBuilder: FormBuilder, private navCtrl: NavController,private cartService: CartService, private modalCtrl: ModalController,private router: Router){
this.platform.ready().then(()=>{
this.cartAdd();
})
}

Database

Posts: 2

Participants: 1

Read full topic

Change item border colour based on parent class

$
0
0

@Tanakasan1734 wrote:

I feel like this is a pretty simple one but my Google skills are failing me. I have set my ion-item background color to medium and while the text has gone white the dividing lines haven’t. I’m trying to set their color with the border-color variable and failing.

I’ve tried:

<ion-row class="round-log">
      <ion-list-header color="medium">
        <ion-label>Rounds</ion-label>
      </ion-list-header>
      <ion-col>
        <ion-list #roundsLogDisplay>
          <ion-item *ngFor="let round of roundsLog; let i = index; let last = last;"
                     lines="{{ last ? 'none' : '' }}" color="medium"  border-color="#ffffff">
            Round {{ i + 1 }}: {{ round }} secs
          </ion-item>
        </ion-list>
      </ion-col>
    </ion-row>

and

.round-log ion-item{ 
    --border-color: #ffffff; 
}

in my scss file. There is another list on this page that doesn’t have a medium background colour so it needs to be off the .round-log parent.

What am I missing? Thanks :grinning:

Posts: 1

Participants: 1

Read full topic

How to enable gps services programatically in capacitor?

$
0
0

@jos333 wrote:

I am using capacitor 2.0.1. And when I am using geolocation API from the capacitor. if GPS is off, then I get the below result.

capacitor-runtime.js:421 

{message: "location unavailable"}
message: "location unavailable"

But how to enable GPS, if it’s off? Please advice.


Installed Dependencies:

  @capacitor/cli: 2.0.1

  @capacitor/core: 2.0.1

  @capacitor/android: 2.0.1

  @capacitor/electron: 2.0.1

  @capacitor/ios: 2.0.1

Posts: 1

Participants: 1

Read full topic

Viewing all 70440 articles
Browse latest View live


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