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

I want to learn more details about Ionic Pro developer pack

$
0
0

@umutgur wrote:

Hi there,

I want to buy a developer package for Ionic Pro, but I’m not sure about the content. The main thing for me is to be able to develop with code via web browser. Does this package provide this?

Also, can I continuously test my application on my mobile device with the application I am going to install on my mobile device?

Thank you.

Posts: 1

Participants: 1

Read full topic


Change "swipeBackEnabled" gesture start position

$
0
0

@SwenVogel wrote:

Hi,

is it possible to change the start position of the swipe back gesture (distance to the left screen edge)? Currently the swipe gesture must start near the left edge of the screen. I would like to relax this a little bit.
For example that gesture can start in the left half of the screen.

Posts: 1

Participants: 1

Read full topic

Consolidated menu page

$
0
0

@rrkeegan wrote:

I’m a new Ionic user and recently started my first project using the Ionic Super Starter project. The starter defines the slide-out menu component and data in app.component.ts. So far that makes sense, yet there is also a MenuPage defined in the pages/menu folder. I like how the menu logic is consolidated here rather than in the primary app component setup. Unfortunately I can’t see that this menu isactually used anywhere.

Ideally I would like to consolidate all menu logic into one location so that I can inject components and utilize providers for more dynamic data. How can I use the example menu page instead of the hard-coded menu defines in app.component?

Posts: 1

Participants: 1

Read full topic

Calling Rest API from android device

$
0
0

@vksin wrote:

Hi,

I am trying to call a rest api from ionic code. Rest api is also developed in my local system. IP address of my windows system is 192.168.67.1. The get request api has url is:
http://192.168.67.1:8088/check-price/code-001
Now the problem:
I am able call the rest api when i build/run the app using command
ionic lab (as this opens up the app on browser)
this also work when ionic code runs on emulator by command.
ionic cordova run android --e78ab88d.

This FAILS when i run the code on actual android device by using command.
ionic cordova run android --device

Need help on this.

Posts: 1

Participants: 1

Read full topic

There is way to log ionic app to file?

$
0
0

@developer_med wrote:

hi guys i’m dev an ionic 3 app, so i use ionic background mode plugin to keep app running in background, after 2 or 3 h of running in background my app crash and it s not available it closed auto when i move fourground app is not here, so i want to use some kind of logger to log errror to a file, then i can read this log file to catch the error, so my question is there is way to do that.
thnk u so much guys,

Posts: 1

Participants: 1

Read full topic

Ionic 3 ion-title misaligned vertically and small

$
0
0

@bmachlin wrote:

When I run ionic serve and view in chrome, I see this most of the time:

image

and occassionally it appears correctly, like this:

image

Specifically the first time after I run ionic serve it shows correctly, after that it shows like the first pic.
Here’s all of my header code:

<ion-header>
  <ion-navbar color="header-portfolio">
    <ion-title>Portfolio</ion-title>
  </ion-navbar>
</ion-header>

Running on Windows 10. When I deploy to Android the problem doesn’t exist, but when I delpoy to iOS it does! Strange!

There’s also this strange, but maybe telling result if I hit f12 twice in chrome, notice the quick adjustment made right after it returns to phone view:

Running ionic 3.19.1 and cordova 8.0.0

Any help is much appreciated, thanks!

Posts: 1

Participants: 1

Read full topic

Healthkit and heart rate using Apple Watch and Ionic

$
0
0

@Adam1234 wrote:

I am making an AppleWatch application that gathers users second-by-second heart rate. I want to relay this data to my ionic app. I’m thinking of using health kit but I’m not quite sure if this is the correct approach.

How can I connect my ionic application to an AppleWatch app? Are there native plugins I can use? I know ionic-Cordova offers a native plugin called ‘health’ and the ios native-plugin ‘HealthKit’ but I don’t think my Apple watch app will route through Apples HealthKit.

Posts: 2

Participants: 2

Read full topic

Local build fails after adding fingeprint-aio plugin

$
0
0

@ddsn wrote:

Hi guys,

I had this problem when adding fingeprint-aio plugin to real app but below is the simplest scenario.

Create new blank ionic app:

ionic start blank blank
cd blank
ionic cordova platform add android
ionic serve -c					-	works
ionic cordova build android		-	works

then add https://ionicframework.com/docs/native/fingerprint-aio/ plugin:

ionic cordova plugin add cordova-plugin-fingerprint-aio
npm install --save @ionic-native/fingerprint-aio

then run the same commands even without using fingerprint-aio in a app code

ionic serve -c					-	works
ionic cordova build android		-	does not works

I got error from build command which looks like that:

cp: copyFileSync: could not write to dest file (code=ENOENT):C:\gregr\ionic\pansw\blank\platforms\android\res\xml\config.xml

Parsing C:\gregr\ionic\pansw\blank\platforms\android\res\xml\config.xml failed
(node:21108) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1):
Error: ENOENT: no such file or directory, open ‘C:\gregr\ionic\pansw\blank\platforms\android\res\xml\config.xml’
(node:21108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Note that there is no even xml folder in \blank\platforms\android\res\ directory in my project. If I copy xml directory from \blank\platforms\android\app\src\main\res to \blank\platforms\android\res\ and try to build project I get similar error about other missing file: \blank\platforms\android\res\values\string.xml and so one.

Is it a way to make that plugin working? I believe that I have latest (or very recent) versions of ionic and Android SDK.

Posts: 1

Participants: 1

Read full topic


Cant log in in ionic account

Problems with cordova plugin cordova.plugins.diagnostic

$
0
0

@gceduvieira wrote:

Problems with plugin cordova when installing the plugin it is stopping the application.
cordova.plugins.diagnostic

Posts: 1

Participants: 1

Read full topic

Any roles & permissions packages like ngx-permissions available for Ionic 3 & Angular 5?

Can't launch on ios platform

$
0
0

@DeenGao wrote:

I have been successfully test on android device
but totally can’t launch app in ios emulator

here is the XCode log
when launch app

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSURL URLByAppendingPathComponent:isDirectory:]: component, components, or pathExtension cannot be nil.’

Posts: 1

Participants: 1

Read full topic

Help me sqllite

$
0
0

@nguyentrunghieutcu wrote:

i have error
ERROR TypeError: Cannot read property 'executeSql' of undefined
    at DatabaseProvider.webpackJsonp.148.DatabaseProvider.saveData (database.ts:64)
    at SafeSubscriber._next (domain.ts:30)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
    at SafeSubscriber.next (Subscriber.js:185)
    at Subscriber._next (Subscriber.js:125)
    at Subscriber.next (Subscriber.js:89)
    at MapSubscriber._next (map.js:85)
    at MapSubscriber.Subscriber.next (Subscriber.js:89)
    at XMLHttpRequest.onLoad (http.js:1556)
    at t.invokeTask (polyfills.js:3) 

File T.S :
 check(){
    this.domain.checkdomain(this.domainn).subscribe(res=>{
      if(res.success== true){
        console.log(res.data);
        localStorage.setItem("domain",JSON.stringify(res.data));
        this.database.saveData(res.id,res.api_url,res.company,res.domain,res.email,res.site_logo);
        this.navCtrl.push(LoginPage);
      }else{
        let alert = this.alertCtrl.create({
          subTitle: res.message,
          buttons: [
           { text:'OK'}]
        })
        alert.present();
      }
    })
  }

File database.ts :slight_smile:
 saveData(id, api_url, company,domain,email,site_logo) {
    let data = [id, api_url, company,domain,email,site_logo]
    return this.database.executeSql("INSERT INTO domain (id, api_url, company,domain,email,site_logo) VALUES (?, ?, ?, ?, ?, ?)", data).then(data => {
      return data;
    }, err => {
      console.log('Error: ', err);
      return err;
    });
  }`Preformatted text``Preformatted text`

Posts: 1

Participants: 1

Read full topic

Application structure

$
0
0

@zolotoy wrote:

I am looking into a typical Ionic project structure. It’s based on an idea that every page has its own folder where all the page parts (specifically components) reside. In reality an application might have pages that mostly use common business components - components that are built on a top of a generic framework. Ionic in this case. Shouldn’t be there a common place for all these business components? Like in AngularJS development I have common folders for all my directives that serve the purpose of being my business component framework. Any idea?

Thanks

Posts: 1

Participants: 1

Read full topic

How to use font awesome v5 in ionic 3?


Validate AlertController input field

$
0
0

@newBeat wrote:

Please let me know what is the meaning of User in the handler field.
What is this validation method? I’m new to ionic.

presentPrompt() {
  let alert = this.alertCtrl.create({
    title: 'Login',
    inputs: [
      {
        name: 'username',
        placeholder: 'Username'
      },
      {
        name: 'password',
        placeholder: 'Password',
        type: 'password'
      }
    ],
    buttons: [
      {
        text: 'Cancel',
        role: 'cancel',
        handler: data => {
          console.log('Cancel clicked');
        }
      },
      {
        text: 'Login',
        handler: data => {
          if (User.isValid(data.username, data.password)) {
            // logged in!
          } else {
            // invalid login
            return false;
          }
        }
      }
    ]
  });
  alert.present();
}

Posts: 1

Participants: 1

Read full topic

Multiple selection with form set default value

$
0
0

@costaeder wrote:

Hi,

I have a list of pets for multi-selection. But in edit mode of form the elements is not coming selected, and then the form shows invalid.

My form:

this.eventForm = fb.group({
...
 'pets': [this.event.pets.map(x => x.id), Validators.compose([Validators.required])],
...
});
ionViewDidLoad() {
 this.petBackend.getAll().subscribe(pets => {
      this.pets = [];
      for (let p of pets) {
        let petSelected = this.event.pets.filter(a => a.id == p.id).length > 0;
        this.pets.push({ pet: p, checked: petSelected });
      }
    });
}

My html:

 <ion-select formControlName="pets" multiple="true">
                                <ion-option *ngFor="let pet of pets" [value]="pet.pet.id" [selected]="pet.checked">{{pet.pet.name}}</ion-option>
                            </ion-select>

I tried using the pet object as a value and others ways. If I set [select]=“true”, all objects comes selected.

My dependencies:


 "dependencies": {
        "@agm/core": "^1.0.0-beta.2",
        "@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/call-number": "^4.5.2",
        "@ionic-native/core": "3.12.1",
        "@ionic-native/geolocation": "^4.5.3",
        "@ionic-native/launch-navigator": "^4.5.2",
        "@ionic-native/onesignal": "^4.5.3",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic/storage": "2.0.1",
        "call-number": "^1.0.1",
        "cordova-android": "7.0.0",
        "cordova-plugin-actionsheet": "^2.3.3",
        "cordova-plugin-compat": "^1.2.0",
        "cordova-plugin-console": "^1.1.0",
        "cordova-plugin-device": "^1.1.7",
        "cordova-plugin-dialogs": "^2.0.1",
        "cordova-plugin-geolocation": "^2.4.3",
        "cordova-plugin-splashscreen": "^4.1.0",
        "cordova-plugin-statusbar": "^2.4.1",
        "cordova-plugin-whitelist": "^1.3.3",
        "intl": "^1.2.5",
        "ionic-angular": "3.6.1",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic2-calendar": "^0.3.13-weekdayview-tpls",
        "ionicons": "3.0.0",
        "lodash": "^4.17.4",
        "moment": "^2.20.1",
        "onesignal-cordova-plugin": "^2.3.1",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.3",
        "zone.js": "0.8.12",
        "mx.ferreyra.callnumber": "~0.0.2"
    },
    "devDependencies": {
        "@ionic/app-scripts": "^2.1.3",
        "awesome-typescript-loader": "^3.2.3",
        "ionic": "3.19.1",
        "typescript": "2.3.4"
    },

Tank you!

Posts: 1

Participants: 1

Read full topic

WooCommerce variable products

$
0
0

@Monster555 wrote:

Hi there…
I need to correctly display my woocommerce variable products on my app. I’m a bit stuck on this… I created a quite simple algorithm that works fine when the product has only one variation. The problem comes when the product has more than one variation.
Any suggestion on this???
I really need help on this…
Thanx in advance

Posts: 1

Participants: 1

Read full topic

Ionic app changes are not working

$
0
0

@Sandeeprachha wrote:

Hi Guys,
Please help me out.
I got already existed project with ionic framework 1.3.1 and Angular 2.So installed latest ionic CLI 3.19.1.
When I run ionic Cordova build iOS it says warning like “Not performing Ionic build for project type: ionic1.” but at the end, it showing build succeeded.

But my changes in an HTML page is not reflecting into the app.but when I changed something in CSS file it getting reflecting, but when adding an element it’s not getting reflecting into the app.

below is the result of ionic info command.

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

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

Cordova Platforms : android 5.1.1 ios 4.2.1
Ionic Framework   : ionic1 1.3.1

System:

Node  : v7.10.0
npm   : 4.2.0
OS    : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

My observations. there is a file called templateCache.js if I change anything then it’s reflecting into the app.I’m not sure why this file is?also, there is no app script and typescript written in package.json under devDependencies.

Please help me guys.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

CORS issue on real device

$
0
0

@hardikajmeri wrote:

Hello,
I’ve added proxy in ionic.config.json and also checked platform and based on my platform am changing API url but seems CORS issue is not fixed for me.

ionic.config.json

{
  "name": "eppm",
  "app_id": "",
  "type": "ionic-angular",
  "integrations": {
    "cordova": {}
  },
  "proxies": [
    {
      "path": "/path",
      "proxyUrl": "http://domain/path"
    }
  ]
}

Api-manager.ts

import { Platform } from 'ionic-angular';
@Injectable()
export class ApiManagerProvider {
url:string;
constructor(private platform: Platform, public http: HttpClient, private cManager: CookieManagerProvider) { }
 private makePostRequest(command: string, data: any) {

    if(this.platform.is('core') || this.platform.is('mobileweb')) {
      url = 'pace/rest/3.0/eppm/cmd/';
      console.log("Web");
    }
    else {
      url = 'http://vs2.paramatrix.com:8764/pace/rest/3.0/eppm/cmd/';
      console.log("Mobile");
    }

    let apiHeader = new HttpHeaders();
    let contentType = apiHeader.set('Content-Type', 'application/x-www-form-urlencoded');
    let pace = contentType.append('pace-useragent', 'rest');

    let param = new URLSearchParams();
    for (var key in data) {
      param.append(key, data[key]);
    }

    return new Promise((resolve, reject) => {
      this.http.post(this.url + command, param.toString(), { headers: pace, withCredentials: true }).subscribe(res => {
        resolve(res);
      }, (error: HttpErrorResponse) => {
        reject(error);
      });
    });
  }
}

config.xml

<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

Kindly help me to figure this out guys.
Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Viewing all 49334 articles
Browse latest View live


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