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

Create video from images on the client side in Ionic

$
0
0

@myfitstatus wrote:

I have searched the forum as well as Google and have not found an obvious solution. I would like to take several images and combine them into a video. I found a way to create an animated GIF which is almost good enough but I would like to have the option of adding background music. I found a way to do this on the server side but it uses ffmpeg so it is not a pure JS solution. Aside from writing a special native plugin for iOS and Android to do this, does anyone have any thoughts or a library that I’m missing? I know I can generate the video on the server and transfer back to the client, but I would like to avoid the additional bandwidth if possible since that could add up over time with many users building videos on the server.

Any thoughts greatly appreciated.

Posts: 2

Participants: 2

Read full topic


[Slides] How to make Infinity Slides in ionic

$
0
0

@user5555 wrote:

I want to have a view, where I can swipe right and left to navigate in dynamic content.
My current approach:
I have 3 slides in a loop on Sliding I change the data to match the new positions.
My data is stored in an array like

weeks = [
 week1,
 week2,
 week3
];

It somewhat works, but on looping it displays old data ( when i touch it it refreshes to the real data ).

My questions are now:

  1. does anyone have successfuly made an infinity slide with dynamic content?
  2. do you have any working examples on this topic?

PS: only the visuals are buged -> my code seems to work properly.

Posts: 2

Participants: 1

Read full topic

Number input opens keyboard only unreliably

$
0
0

@cclausen wrote:

I am seeing a bug where the keyboard is only opened unreliably on type=“number” inputs.
Specifically the first tap on the input does open the keyboard as expected, but after closing it again it fails to react to taps at all. This happens sometimes, not always, and can be fixed by the user by navigating to some other page and back.
It happens often enough to be a major problem for numeric inputs however.

Below is a minimal example of a page that causes the problem. Notice that the ion-list appears to be somehow important to the problem. Without the list the bug does not occur.

<ion-header>
  <ion-navbar>
    <ion-title>Problem with numeric input in ion-lists</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-list>
      <ion-item>
          <ion-input type="number"></ion-input>
        </ion-item>
    </ion-list>
</ion-content>

Testing on Android 6.0.1 and ionic 3.18

Posts: 1

Participants: 1

Read full topic

Data won't show up in phpmyadmin

$
0
0

@valentinay wrote:

I am trying to create a user registration form using php/mysql and ionic
however when i enter data the feedback says it was successful but nothing will show up in the database except 0s for all entries this is only one row no matter how many time i enter the data.
This is my ts file :

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ToastController } from 'ionic-
angular';
import { FormGroup, Validators, FormBuilder } from '@angular/forms';
import { Http, Headers, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/map';
//import { PInfoPage } from '../p-info/p-info';

 @IonicPage()
@Component({
 selector: 'page-acc-info',
templateUrl: 'acc-info.html',
})
export class AccInfoPage {

// Define FormBuilder /model properties
public form               : FormGroup;
public AdminUsername         : any;
public PatientUsername  		 : any;
public AccountPassword  		 : any;
 // Flag to hide the form upon successful completion of remote operation
public isEdited               : boolean = false;
public hideForm               : boolean = false;
// Property to store the recordID for when an existing entry is being edited
public AccountID             : any      = null;
private baseURI           : string  = "http://localhost:10080/ionic/";

 // Initialise module classes
  constructor(public navCtrl    : NavController,
           public http       : Http,
           public NP         : NavParams,
           public fb         : FormBuilder,
           public toastCtrl  : ToastController)
{

  // Create form builder validation rules
  this.form = fb.group({
     "a_username"                  : ["", Validators.required],
     "p_username"                  : ["", Validators.required],
	 "password"                    : ["", Validators.required],
   });
}

 ionViewWillEnter()
{
  this.resetFields();

  if(this.NP.get("account"))
  {

     this.isEdited      = false
  }
  }

 // Assign the navigation retrieved data to properties
 // used as models on the page's HTML form
 selectEntry(item)
 {
  this.AdminUsername        = item.a_username;
  this.PatientUsername      = item.p_username;
  this.AccountPassword      = item.password;
  this.AccountID            = item.acc_id;
 }


createEntry(a_username, p_username, password)
 {
  let body     : string   = "key=create&a_username=" + a_username +
 "&p_username=" + p_username + "&password=" + password,
      type     : string   = "application/x-www-form-urlencoded; charset=UTF-
 8",
      headers  : any      = new Headers({ 'Content-Type':type}),
      options  : any      = new RequestOptions({ headers: headers }),
      url      : any      = this.baseURI + "manage-data.php";

  this.http.post(url, body, options)
  .subscribe((data) =>
  {
     // If the request was successful notify the user
     if(data.status === 200)
     {
        this.hideForm   = true;
        this.sendNotification(`Congratulations the account was successfully
 created`);
     }
     // Otherwise let 'em know anyway
     else
     {
        this.sendNotification('Something went wrong!');
     }
  });
 }

 // Handle data submitted from the page's HTML form
 // Determine whether we are adding a new record or amending an
// existing record
saveEntry()
{
  let a_username          : string = this.form.controls["a_username"].value,
      p_username   : string    = this.form.controls["p_username"].value,
	  password   : string    = this.form.controls["password"].value


	  this.createEntry(a_username,p_username, password);
	 //this.navCtrl.push(PInfoPage);

 }

 // Clear values in the page's HTML form fields
 resetFields() : void
 {
  this.AdminUsername    = "";
  this.PatientUsername    = "";
  this.AccountPassword      = "";
 }

 // Manage notifying the user of the outcome
 // of remote operations
 sendNotification(message)  : void
 {
  let notification = this.toastCtrl.create({
      message       : message,
      duration      : 3000
  });
   notification.present();
}
}

and this is my php file:

<?php

header('Access-Control-Allow-Origin: *');

// Define database connection parameters
$hn      = 'localhost';
$un      = 'root';
$pwd     = '';
$db      = 'ring a bell';
$cs      = 'utf8';

// Set up the PDO parameters
$dsn  = "mysql:host=" . $hn . ";port=3306;dbname=" . $db . ";charset=" .
$cs;
$opt  = array(
                    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
                    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,
                    PDO::ATTR_EMULATE_PREPARES   => false,
                   );
// Create a PDO instance (connect to the database)
$pdo  = new PDO($dsn, $un, $pwd, $opt);

// Retrieve specific parameter from supplied URL
$key  = strip_tags($_REQUEST['key']);
$data    = array();
switch($key)
{
  // Add a new record to the technologies table
  case "create":

     // Sanitise URL supplied values
     $a_username        = filter_var($_REQUEST['a_username'],
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);
     $p_username   		= filter_var($_REQUEST['p_username'],
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);
	 $password       	= filter_var($_REQUEST['password'],
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);

     // Attempt to run PDO prepared statement
     try {
        $sql  = "INSERT INTO account_info(a_username, p_username, password)
VALUES(:a_username, :p_username, :password)";
        $stmt    = $pdo->prepare($sql);
        $stmt->bindParam(':a_username', $a_username, PDO::PARAM_STR);
        $stmt->bindParam(':p_username', $p_username, PDO::PARAM_STR);
		$stmt->bindParam(':password', $password, PDO::PARAM_STR);

        $stmt->execute();

        echo json_encode(array('message' => 'Congratulations the Account
was added to the database'));
     }
     // Catch any errors in running the prepared statement
     catch(PDOException $e)
     {
        echo $e->getMessage();
     }

  break;
 }
?>

and this is my hmtl:

<ion-content>

<ion-header>
<ion-navbar>
  <ion-title>Account Info</ion-title>
</ion-navbar>
</ion-header>

<div *ngIf="!hideForm">
     <form [formGroup]="form" (ngSubmit)="saveEntry()">
<ion-item-group ion-fixed>

      <ion-item>
        <ion-label stacked>Admin Username</ion-label>
        <ion-input  type="text" placeholder="A_JhonDoe"
 formControlName="a_username"
                    [(ngModel)]="AdminUsername"></ion-input>
      </ion-item>

      <ion-item>
        <ion-label stacked>Patient Username</ion-label>
        <ion-input  type="text" placeholder="P_JhonDoe"
formControlName="p_username"
                    [(ngModel)]="PatientUsername" ></ion-input>
      </ion-item>
      <ion-item>
        <ion-label stacked>Password</ion-label>
        <ion-input type="password" placeholder="Password"
formControlName="password"
                    [(ngModel)]="AccuntPassword" ></ion-input>
      </ion-item>

      <ion-item>
        <ion-label stacked>Verify Password</ion-label>
        <ion-input  type="password" placeholder="Verify Password"></ion-
input>
      </ion-item>


</ion-item-group>
</form>
  </div>
<button ion-button block outline large color="light"
[disabled]="!form.valid" (click)="saveEntry()">Add Patient Info</button>

 </ion-content>

Posts: 1

Participants: 1

Read full topic

Change icon type after clicking

$
0
0

@sneceesay77 wrote:

I am trying to implement simple like and unlike functionality using one button. If a user already likes that card then it should have a filled red heart icon else just an outline heart icon. My problem is if I click the heart icon it changes all other card heart icons to red. I want to change only the currently clicked one. I tried to use property binding as shown in my code but it is still not working. I understand the problem is caused by the “isliked” variable but I am not sure how to specify only a specific card.

In my template I have the below code

<ion-card *ngFor="let ...>
  <ion-row>
     <ion-col>
      <button ion-button icon-left clear small (click)=" (!current_user_liked || !isliked) ? processLike('like') : processLike( 'unlike')">
        <ion-icon [name]="((current_user_liked ||  isliked) ? 'heart' : 'heart-outline'" </ion-icon>
      </button>
    </ion-col>
  </ion-row>
</ion-card>

In my .ts file, I have the below code.

isliked:boolean = false;
processLike(action){
    if(action == 'like'){
      this.isliked = true;
    }else if(action == 'unlike'){
      this.isliked = false;
    }
}

Cheers

Posts: 3

Participants: 2

Read full topic

Ionic 3 render HTML from JSON

$
0
0

@earnestware wrote:

I found reference to using <div ng-bind-html="variable.html"></div> where variable.html is escaped html from a json payload. I can render the html using {{variable.html}} but this is not what I want. Using ng-bind-html doesn’t work, it’s just a blank/empty div.

Any help is appreciated

Posts: 3

Participants: 2

Read full topic

Lazy Loading Pages/Modules

$
0
0

@jicee13 wrote:

So I’m trying to implement the normal angular approach to lazy loading but am running into issues with loading some pages.

So I have a Reports module which consists of 3 pages. I defined the pages within the module that is lazily loaded, however when I try to navigate to any of these pages I just get the error telling me to add the pages to my @ngModule entryComponents, which I did…

Does anyone have a working example of lazily loading a module with multiple pages to navigate to?

Posts: 1

Participants: 1

Read full topic

Require()'ing a separated JS file without triggering typescript errors?

$
0
0

@peterwilli wrote:

Hi guys,

I got a Ionic layout from a coworker. I’m not 100% familiar with typescript and angular v2. I can work in her layout but I fail at just including an local JS file (i.e require("./functions.js"))

So the main goal is: include a local (read: in the src-folder) JS file in a .ts file (i.e a component) without setting of any linting alarms.

I tried a number of things, including:

  • Adding "allowJs": true, to tsconfig.json
  • Fiddling around with the .ts file where I require the file (I keep getting linting errors I can’t seem to ignore).

Doing a Google search returns out nothing. Please help, I took more time solving this than actually building the functions themselves :frowning:

Posts: 2

Participants: 2

Read full topic


How to add input box in alert with readonly property

Recent updates prevent app from starting

$
0
0

@Rasioc wrote:

I have a big issue right now:
After updating cordova and ionic few days ago I was successfully working in debug mode.
Now I wanted to create an update for ios and android, build went fine, but then on the devices the app stucks at the splashscreen for ios AND android.

So for android I found following error in adb logcat:

11-25 07:06:43.254 26608 26608 I art     : Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.eb>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/RenderProcessGoneDetail;
11-25 07:06:43.254 26608 26608 I art     :   at com.android.webview.chromium.Ap com.android.webview.chromium.WebViewChromiumFactoryProvider.G(android.webkit.WebView, android.content.Context) (WebViewChromiumFactoryProvider.java:323)
11-25 07:06:43.254 26608 26608 I art     :   at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)
11-25 07:06:43.254 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636)
11-25 07:06:43.254 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572)
11-25 07:06:43.254 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555)
11-25 07:06:43.254 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542)
11-25 07:06:43.254 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebView.<init>(android.content.Context, android.util.AttributeSet) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebView.<init>(android.content.Context) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebViewEngine.<init>(android.content.Context, org.apache.cordova.CordovaPreferences) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
11-25 07:06:43.254 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
11-25 07:06:43.254 26608 26608 I art     :   at org.apache.cordova.CordovaWebViewEngine org.apache.cordova.CordovaWebViewImpl.createEngine(android.content.Context, org.apache.cordova.CordovaPreferences) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at org.apache.cordova.CordovaWebViewEngine org.apache.cordova.CordovaActivity.makeWebViewEngine() ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at org.apache.cordova.CordovaWebView org.apache.cordova.CordovaActivity.makeWebView() ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void org.apache.cordova.CordovaActivity.init() ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void org.apache.cordova.CordovaActivity.loadUrl(java.lang.String) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void de.xxxxx.MainActivity.onCreate(android.os.Bundle) ((null):-1)
11-25 07:06:43.254 26608 26608 I art     :   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6743)
11-25 07:06:43.254 26608 26608 I art     :   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1134)
11-25 07:06:43.254 26608 26608 I art     :   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2715)
11-25 07:06:43.254 26608 26608 I art     :   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2848)
11-25 07:06:43.254 26608 26608 I art     :   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
11-25 07:06:43.254 26608 26608 I art     :   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1552)
11-25 07:06:43.255 26608 26608 I art     :   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
11-25 07:06:43.255 26608 26608 I art     :   at void android.os.Looper.loop() (Looper.java:154)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6334)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
11-25 07:06:43.255 26608 26608 I art     :   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)
11-25 07:06:43.255 26608 26608 I art     :   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)
11-25 07:06:43.255 26608 26608 I art     : Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/data/app/com.android.chrome-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-2/lib/arm64, /data/app/com.android.chrome-2/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
11-25 07:06:43.255 26608 26608 I art     :   at com.android.webview.chromium.Ap com.android.webview.chromium.WebViewChromiumFactoryProvider.G(android.webkit.WebView, android.content.Context) (WebViewChromiumFactoryProvider.java:323)
11-25 07:06:43.255 26608 26608 I art     :   at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)
11-25 07:06:43.255 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636)
11-25 07:06:43.255 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572)
11-25 07:06:43.255 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555)
11-25 07:06:43.255 26608 26608 I art     :   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542)
11-25 07:06:43.255 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebView.<init>(android.content.Context, android.util.AttributeSet) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebView.<init>(android.content.Context) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void org.apache.cordova.engine.SystemWebViewEngine.<init>(android.content.Context, org.apache.cordova.CordovaPreferences) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
11-25 07:06:43.255 26608 26608 I art     :   at org.apache.cordova.CordovaWebViewEngine org.apache.cordova.CordovaWebViewImpl.createEngine(android.content.Context, org.apache.cordova.CordovaPreferences) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at org.apache.cordova.CordovaWebViewEngine org.apache.cordova.CordovaActivity.makeWebViewEngine() ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at org.apache.cordova.CordovaWebView org.apache.cordova.CordovaActivity.makeWebView() ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void org.apache.cordova.CordovaActivity.init() ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void org.apache.cordova.CordovaActivity.loadUrl(java.lang.String) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void de.xxxxx.MainActivity.onCreate(android.os.Bundle) ((null):-1)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6743)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1134)
11-25 07:06:43.255 26608 26608 I art     :   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2715)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2848)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1552)
11-25 07:06:43.255 26608 26608 I art     :   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
11-25 07:06:43.255 26608 26608 I art     :   at void android.os.Looper.loop() (Looper.java:154)
11-25 07:06:43.255 26608 26608 I art     :   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6334)
11-25 07:06:43.255 26608 26608 I art     :   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
11-25 07:06:43.255 26608 26608 I art     :   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)
11-25 07:06:43.255 26608 26608 I art     :   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)
11-25 07:06:43.255 26608 26608 I art     :
11-25 07:06:43.258  1385  1452 D DeviceIdleController: handleMessage(7)
11-25 07:06:43.281 26608 26608 D SystemWebViewEngine: CordovaWebView is running on device made by: OnePlus

Which makes no sense.
According to this page https://developer.android.com/reference/android/webkit/RenderProcessGoneDetail.html The not found class has been introduced in API Level 26. However, I am testing on an API level 25 device. My config.xml contains

        <preference name="android-minSdkVersion" value="19" />
        <preference name="android-targetSdkVersion" value="27" />

I tried to remove the platform android completely, and re-added it. Same result.

On iOS, the app also stucks at the splashscreen (even more strange, as this error looks very android specific). But I cannot find anything which looks like an error in the iOS log.

Can anybody help me?

onic info

cli packages: (C:\nvm\v8.4.0\node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 25.2.5
    Node              : v8.4.0
    npm               : 5.3.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\AndroidSDK

Misc:

    backend : legacy

edit:
Ok maybe we have something different here… Not sure, but I have Sentry error reporting in JS code enabled, and just got an email that my app is reporting the error exception {"isTrusted": true} when started. I have no idea what that means.

edit2:
Ok after making the app debuggable I saw no error in console, but after enabling stopping at exception, I found a proper exception. Seems like i upgraded an Rxjs import wrong…
Seems like I imported several operators wrong or not at all (some where not imported before and “just worked” but after the update it seems like they need to be imported explicitly…)

Posts: 1

Participants: 1

Read full topic

Tabs not working properly

$
0
0

@navaneethan111 wrote:

Hi ,
I am creating ionic app in that tabs not working properly my tabs always stay in homePage even i push in to another page see below my code and pls help me
tabs.html

<ion-tab [root]=“homePage” tabTitle=“Create Order” tabIcon=“ios-copy”>
<ion-tab [root]=“dashboardPage” tabTitle=“Category” tabIcon=“apps”>
<ion-tab [root]=“SummaryPage” tabTitle=“Summary” tabIcon=“paper”>

tabs.ts
@Component({
selector: ‘page-tabs’,
templateUrl: ‘tabs.html’,
})
export class TabsPage {
homePage = HomePage;
dashboardPage = DashboardPage;
SummaryPage = SummaryPage;

constructor(public navCtrl: NavController, public navParams: NavParams) {
}
}

Posts: 1

Participants: 1

Read full topic

Google Maps API to get bus route

Local storage working for first time only in ionic 3

$
0
0

@navaneethan111 wrote:

Hi,
I am using local storage in my application, which works very well on the first time and on the second time it show empty otherwise it is show previous username.

Below is the code .
First page for setting data

Login.ts
if(this.responseData.result==‘true’){
localStorage.setItem(‘username’,this.userData.loginname )
this.navCtrl.push(TabsPage);
}

app_component.ts

constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen,
public menu : MenuController ) {

this.initializeApp();
// used for an example of ngFor and navigation
this.pages = [
  { title: localStorage.getItem('username') ,component: TabsPage,icon:'ios-contact-outline' },
  { title: 'Order-id :', component:SummaryPage,icon:'ios-cart-outline' },
  { title: 'Home', component: TabsPage,icon:'ios-home-outline' },
  { title: 'Help', component: TabsPage,icon:'ios-help-circle-outline' },
  { title: 'Logout', component: null,icon:'ios-exit-outline' }
  ];
  }

initializeApp() {
this.platform.ready().then(() => {

  this.statusBar.styleDefault();
  this.splashScreen.hide();
});

}

openPage(page) {
// Reset the content nav to have just this page
// we wouldn’t want the back button to show in this scenario
if(page.component) {
this.nav.setRoot(page.component);

} else {

  this.nav.setRoot(LoginPage);
  this.menu.enable(false, 'myMenu');
localStorage.clear();

}
}

Posts: 2

Participants: 2

Read full topic

Implementing animation library in ionic

$
0
0

@jeelani wrote:


how can i implement this library in ionic how to import those css files mentioned there

Posts: 1

Participants: 1

Read full topic

IOS App crashing on startup

$
0
0

@Nouf wrote:

I am trying to test my app on a real device and I have uploaded it to itunesconnect and installed it on my phone using TestfFlight but the app crashing immediately after the splash screen.
And I check the Crashes and found this “-[CDVViewController configFilePath] + 332”.
this is my first-time uploading app so I do not know what I am doing wrong

Posts: 1

Participants: 1

Read full topic


How to generate component with module.ts?

$
0
0

@Putu wrote:

Hello there

I have a complex application with around 50 components. I’ve just using the components.module.ts file to import my components, but I realised it has been slowing down app launch by around 6-7 seconds on average. I’ve since been manually creating a module.ts file for each component, and that load time is down to 1-2 seconds depending on the number of components.

Does the ionic CLI provide a way of generating a component with a module.ts file (rather than clumping everything into one mega-module)? The documentation and help screen don’t show an option to do this.

Thanks

Posts: 1

Participants: 1

Read full topic

Http post to ocr space API

$
0
0

@francescodist wrote:

Hi, I’m trying to make an HTTP request from a Ionic app to to ocr.space API.

this is the code I wrote, the base64image comes from the Camera plugin and is correctly formatted:

let base64Image = 'data:image/jpeg;base64,' + imageData;

     let data = "base64Image=" + base64Image;

     this.http.post("https://api.ocr.space/parse/image",data,{
       headers: new HttpHeaders().set('Content-Type','application/x-www-form-urlencoded')
                                 .set('apikey',this.APIKEY),
     })
                .subscribe((res)=> console.log(res))

However the response I’m getting is that the format of the image is not correct (not true). What am I doing wrong? Thanks for the help!

Posts: 1

Participants: 1

Read full topic

How do you make scss only apply to one page?

$
0
0

@maxbaum wrote:

Hi there, (ionic 3.19.0)

i im used to have the same classes for styling in every page, so my root div on a page always has class=“maincontainer” and so on.

with ionic the code of .maincontainer{} in the different pages overlap.

is there a way to change this behaviour ? :slight_smile:

i know i could add things like page1-maincontainer page2-maincontainer,
but this becomes quite frustrating easily :slight_smile:

thanks to everybody :slight_smile:

Posts: 2

Participants: 2

Read full topic

Virtual Scrolling Rendering does not work after using Keyboard or Camera

$
0
0

@lolujellyx wrote:

Hey, I have a Page with a Virtual Scrolling List - Usually it is working good!

As you can see in this Picture, all fine and good. I can do stuff, navigate and so on and everything works fine.

BUT IF I go on and Use Native Elements like Camera or the Keyboard, the Virtual Scroll List is not displayed anymore or looks like this. Without doing anything just the Keyboard beeing opened on the same NavCtrl.
(Have tried with a Modal-Page and it wont trigger the Problem)

Does anyone have experience on this??

My Ionic Info:

ionic info

cli packages: (C:\Users\Marco\Projects\book-circle-ui\node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.0.0 browser 4.1.0
Ionic Framework    : ionic-angular 3.4.2

System:

Android SDK Tools : 26.1.1
Node              : v6.11.3
npm               : 3.10.10
OS                : Windows 10

Package.json:

“dependencies”: {
"@angular/common": “4.1.3”,
"@angular/compiler": “4.1.3”,
"@angular/compiler-cli": “4.1.3”,
"@angular/core": “4.1.3”,
"@angular/forms": “4.1.3”,
"@angular/http": “4.1.3”,
"@angular/platform-browser": “4.1.3”,
"@angular/platform-browser-dynamic": “4.1.3”,
"@ionic-native/barcode-scanner": “4.3.1”,
"@ionic-native/camera": “^4.2.1”,
"@ionic-native/core": “3.12.1”,
"@ionic-native/date-picker": “^4.3.1”,
"@ionic-native/google-plus": “^4.3.0”,
"@ionic-native/splash-screen": “3.12.1”,
"@ionic-native/status-bar": “3.12.1”,
"@ionic-native/keyboard": “4.3.2”,
"@ionic/storage": “2.0.1”,
“angularfire2”: “^5.0.0-rc.3”,
“cordova-android”: “^6.0.0”,
“cordova-browser”: “^4.1.0”,
“cordova-plugin-camera”: “^2.4.1”,
“cordova-plugin-compat”: “^1.1.0”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-datepicker”: “^0.9.3”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-googleplus”: “^5.1.1”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.2”,
“cordova-plugin-whitelist”: “git+https://github.com/apache/cordova-plugin-whitelist.git”,
“firebase”: “^4.6.0”,
“ionic-angular”: “3.4.2”,
“ionic-plugin-deeplinks”: “^1.0.14”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
"@ionic-native/fcm": “4.3.2”,
“ionic-img-viewer”: “2.7.3”,
“ng-elastic”: “^1.0.0-beta.5”,
“phonegap-plugin-barcodescanner”: “^6.0.0”,
“dexie”: “2.0.1”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“cordova-plugin-fcm”: “^2.1.2”,
“zone.js”: “0.8.18”
},
“devDependencies”: {
"@angular/cli": “^1.1.2”,
"@ionic/app-scripts": “2.1.4”,
"@types/jasmine": “^2.6.3”,
"@types/node": “^8.0.51”,
“codecov”: “2.3.0”,
“connect”: “3.6.3”,
“ionic-mocks”: “0.13.0”,
“jasmine-core”: “2.6.2”,
“jasmine-reporters”: “2.2.1”,
“karma”: “1.7.0”,
“karma-chrome-launcher”: “2.1.1”,
“karma-cli”: “1.0.1”,
“karma-coverage-istanbul-reporter”: “1.2.1”,
“karma-jasmine”: “1.1.0”,
“karma-jasmine-html-reporter”: “0.2.2”,
“karma-junit-reporter”: “1.2.0”,
“protractor”: “5.1.2”,
“serve-static”: “1.12.4”,
“ts-node”: “3.3.0”,
“tslint”: “5.6.0”,
“tslint-eslint-rules”: “4.1.1”,
“typescript”: “2.3.4”
},

Thanks for your help!!

Posts: 1

Participants: 1

Read full topic

Save and pass value from NgModel - what's the best way?

$
0
0

@sponsi wrote:

Hello,
I’ve got a problem. I can’t figure out how to:

  1. Input value api key (ion-input)
  2. Save it locally Storage ?(make it autoloading during application startup)
  3. Pass it to another page which is provider, and make it available there.

What’s the best and not too complicated way to do it ?

Thanks in advance :slight_smile:

Posts: 1

Participants: 1

Read full topic

Viewing all 49110 articles
Browse latest View live


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