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

WordPress Hybrid Client + Ionic


Align ion-checkbox to center

$
0
0

@akshukla07 wrote:

This is my HTML:

<ion-item text-center>
    <ion-label>Never Show Again</ion-label>
    <ion-checkbox [(ngModel)]="noTute"></ion-checkbox>
</ion-item>

I am trying to align the checkbox as well as the label to the center, however, the checkbox always remains left-align and the label gets center-aligned separately after the checkbox (screenshot attached). Is there an ionic way of achieving this?

11 PM

I want the checkbox to be located just before the label “Never show again”

Posts: 1

Participants: 1

Read full topic

Is it possible to display element outside of modal view

$
0
0

@mathiasloy wrote:

Hi all, I currently have an HTML file that would be displayed using modal view. I wish to check if it is possible to display some of the element outside the modal view. Currently what I code inside the HTML, it will only display in the modal box when I use a button to open the modal view.

I tried to use css to move the element, but it only can move within the modal-wrapper.

Hope someone could advice me on this.

Posts: 1

Participants: 1

Read full topic

Ionic 2 app on desktop using electron

$
0
0

@khansharukh wrote:

Hi there,
First of all ionic 2 is awesome, amazing framework to build hybrid cross platform application using the tech we already know.
Thanks Ionic Team.
Now,
I am bit curious to know that whether we can create an desktop application with ionic 2 using Electron
Because I see an electron logo right after google chrome’s logo on WRITE ONCE. DEPLOY ANYWHERE. block/section from ionic frameworks website homepage
I was not able to find any documentation neither on ionic website nor on electron website.
Also not on any other reference on the Web.
Please let me know if any available documentation to implement ionic 2 on electron for desktop applications.

Thanks.

Posts: 1

Participants: 1

Read full topic

Thread 1: signal SIGABRT with FCM and Ionic 3

$
0
0

@vpivet wrote:

Hi, I’m trying to build an Ionic 3 with push notification, I use FCM to do this.
It works in android. But when I try to deploy project on iOS I had this error : Apple Mach-O Linker (ld) Error.
In another forum, I found a solution : remove cordova-plugin-console, so I did it :
The post

Now I can deploy on my iOS device, but the app crash and I have this error in xcode :

Thread 1: signal SIGABRT with FCM

Like this :

Sans titre

I tried to remove and add iOS platform but nothing better …

I really don’t know what I have to do. Any idea ?

My Ionic Info :

cli packages: (/Users/ox/Documents/Mobile/ox/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 : 2.1.0
    Cordova Platforms  : ios 4.5.3
    Ionic Framework    : ionic-angular 3.6.1

System:

    ios-deploy : 1.9.2
    ios-sim    : 5.0.13
    Node       : v6.11.3
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 9.1 Build version 9B55

Posts: 1

Participants: 1

Read full topic

I have problem when I run "ionic cordova build android">>>>>

$
0
0

@ahmadklsany wrote:

My ionic Info>>>>>>>>>>>>
@ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.3
Node              : v8.1.3
npm               : 5.0.3
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Ahmadklsany\AppData\Local\Android\sdk

Misc:

backend : legacy

Posts: 2

Participants: 2

Read full topic

Error executing project build

$
0
0

@Cj10 wrote:

Good afternoon everyone
I am trying to build an application, but when running it appears the following error:
Unable to load PlatformApi from platform. Error: Can not find module’C: \ Users \ Claudio Junior \ like \ platforms \ android \ cordova \ Api.js’

Error: Uncaught, unspecified “error” event. The platform “android” does not apper to be a valid cordova platform. It is missing API.js. android not supported.
Anyone know how I can solve this?
Thank you

Posts: 1

Participants: 1

Read full topic

Onesignal plugin push notification when app is closed

$
0
0

@inartech wrote:

Hi guys… I want to open the app and navigate to a specific page, but handleNotificationOpened() function does not seem to work when app is closed. The push notification comes and when i tap on this, app opens. All day I am trying to find out a solution. Do you have any idea??

Posts: 1

Participants: 1

Read full topic


Store newsfeed from api to localstorage

$
0
0

@khalilben wrote:

Hi,

I have an application that show news by using an api to get data, what i want to do is access to those data without having internet access…
Any example ?

Posts: 1

Participants: 1

Read full topic

Questions about Copyright

$
0
0

@mo4620 wrote:

I want to use Ionicons in a proprietary (closed-source) application. I understand that I am free to do so under the MIT license. I’m trying to determine how to include that copyright statement and license text in a way that makes it clear that only the icons are made available by the MIT license and the rest of the software is closed source. How do I do this properly?

Posts: 1

Participants: 1

Read full topic

Ionic DomSanitizer gives Uncaught TypeError: Cannot read property 'offsetHeight' of null

$
0
0

@VisionnaireMedia wrote:

As many other people I’m trying to retrieve an HTML page from a server to display it on a IONIC app.

Here’s the template/html:

<ion-content padding [innerHtml]="HTMLcontent">
</ion-content>

And here’s the module:

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Http } from '@angular/http';
import { DomSanitizer } from "@angular/platform-browser";

export class RandomPage {
  HTMLcontent;
  constructor(public navCtrl: NavController, public navParams: NavParams, private http:Http, private sanitizer: DomSanitizer) {}
  ionViewDidLoad() {
    this.http.get("SAFE_URL_HERE").subscribe(html=>{
      this.HTMLcontent = this.sanitizer.bypassSecurityTrustHtml(html['_body']);
    });
  }
}

Now, the problem is that whenever I try to access this page I get this error:

Uncaught TypeError: Cannot read property 'offsetHeight' of null
    at Content.getContentDimensions (content.js:529)
    at Content._readDimensions (content.js:693)
    at content.js:220
    at SafeSubscriber.schedulerFn [as _next] (core.js:4235)
    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 EventEmitter.Subject.next (Subject.js:55)
    at EventEmitter.emit (core.js:4203)

The only workaround I found for now is to have a template like this:

<ion-content padding>{{HTMLcontent}}</ion-content>

But it will output text instead of HTML, so it’s not OK

Posts: 1

Participants: 1

Read full topic

How to compile Ionic App for platform ios from command line

$
0
0

@connois wrote:

Hi everybody !

I have been using Ionic 2/3 for a quite a while now on Windows for compiling my apps on platform android, and I’m now making my first steps on the platform ios using a Mac, and I’m having trouble finding the correct process to compile and sign the app.

I’m trying to figure out the correct command line parameters that should be used to compile a Ionic app in both DEBUG and RELEASE mode for platform ios ?

For example for platform Android I use the following command to generate a DEBUG apk:

ionic cordova build android --debug --aot

…and to generate a RELEASE apk I use the following :

ionic cordova build android --release --prod --aot
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myapp.keystore -storepass <store-key> android-release-unsigned.apk <key-name>
zipalign -v 4 android-release-unsigned.apk android-release-signed.apk

What would be the equivalent command line for platform ios for DEBUG and RELEASE ipa ?

Thanks

Arnaud

Posts: 1

Participants: 1

Read full topic

Newbie: "ionic start" already failing with 404 (node-sass not found)

$
0
0

@hardcodet wrote:

Trying to get my first Ionic app to run following the tutorial. Installed ionic and cordova, but it crashes already when trying to set up an application template using ionic start myApp tabs

Downloading the starter seems to work fine, but the subsequent npm i fails after a while:

[ERROR] An error occurred while running npm i (exit code 1):

        > node-sass@4.5.3 install D:\Repositories\Commercial\ridr.taxi\TestApp\node_modules\node-sass
        > node scripts/install.js

        Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-59_binding.node
        Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-59_binding.node":

        HTTP error 404 Not Found

Posts: 4

Participants: 2

Read full topic

Use custom javascript / third party javascript inside a provider

NGx datatable


Add Android emulator parameters to ionic cordova emulate command

$
0
0

@jharkinslamar wrote:

For some reason the Android emulator does not rout to my local machine properly. As a work around I have to use the following commands to get live reload functionality in the emulator.

ionic cordova emulate android --target=TAB4 --livereload --address=my-local-domain.com

And then close and reopen the emulator with this command

emulator @TAB4 -dns-server 192.168.100.114

Does anyone know how to add the “-dns-server 192.168.100.114” parameter to the original command so that I don’t have to close and reopen the emulator to get live reload to work properly?

Thanks

Posts: 1

Participants: 1

Read full topic

Is there a simple way to set cursor: pointer on (tap) items?

$
0
0

@ericeslinger wrote:

The problem: I want everything in my app that has a (tap) event handler to also have cursor: pointer css applied to it. I’ve done this in ng1 apps because the event doodad typically left an attribute on the element (like I could do [ui-sref]: { cursor: pointer; } most of the time, for example).

It looks like the (tap) event doesn’t leave any real grippy residue behind for me to do a simple css selector. Is there a fancy config setting I can put somewhere, or am I stuck attaching an additional class to all of these elements? I can do that too, it’s just inelegant (and brittle).

Posts: 1

Participants: 1

Read full topic

Apache Cordova (PhoneGap) vs Ionic?

$
0
0

@jamesharvey wrote:

Hello Ionic Users.

What do you guys think about Apache Cordova / Phone Gap?

I know Ionic is based on Apache Cordova CLI… but two are not entirely same.
I feel that Apache Cordova is much lighter weight than Ionic.

Apache Cordova

  • Uses JQuery Mobile, Javascript, HTML5, CSS3 with lots of plugs available on https://cordova.apache.org/plugins/
  • Much lighter weight. Its project folder is barely few hundred kilobytes
  • However much less forum support

Ionic

  • It has UI components built in with grid system
  • Heavier weight with lots of components and dependencies
  • Uses Angular 4, TypeScript, HTML5, CSS3 & SASS
  • Forum is very much alive
  • I feel its loading time is kinda slow…

If you were to build an offline app with just CSS3 UI, which one would be your choice?
I’m kinda curious because I think I can build an android app on both frameworks using 90% similar codes…
Please share your opinions!

Thanks,

Posts: 1

Participants: 1

Read full topic

IONIC 3 - WKWebview CORS issues

$
0
0

@pedrodurek wrote:

In order to solve statusbar issues in IOS 11, IONIC team has become the WKWebview as default in the recent release. Since then, I am having CORS issues… I have tried many ways to sort this out, but none of them has had any effect. Although the Native HTTP plugin seems to solve CORS issues, it does not work with the XML content type. I also attempted to use the following plugin: https://github.com/sneas/ionic-native-http-connection-backend

But I am still getting the following error:

Code:

public sendRequest(sufix, json) {

    console.log(json);
    let headers = new Headers({
        'Content-Type': 'application/xml',
        'livefacilities-apptoken': APPTOKEN
    });
    let options = new RequestOptions({ 'headers': headers });
    let xml = this.jsonToXml(json);
    console.log(xml);
    return this.http.post(URL+sufix, xml, options)
        .timeout(TIMEOUT_REQUEST*1000)
        .do(this.logResponse)
        .map(this.extractData)
        .catch(this.handleError);

}

Can anyone help me, please?

Posts: 1

Participants: 1

Read full topic

Can't get data from cordova sqlite

$
0
0

@sheyla wrote:

What I simply try to do is getting data back from sqlite db.

import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';

@Component({
  selector: 'page-messages',
  templateUrl: 'messages.html'
})
export class MessagesPage {
  selectedItem: any;
  messages: any;

  constructor(public navCtrl: NavController, public navParams: NavParams, private sqlite: SQLite) {
    this.selectedItem = navParams.get('item');
    this.messages = [];
    this.sqlite.create({
      name: 'data.db',
      location: 'default'
    })
    .then((db: SQLiteObject) => {
      console.log('SELECT * FROM message');
      db.executeSql('SELECT * FROM message', {})
        .then(function(data) {
          for(let i = 0; i < data.rows.length; i++) {
            let id = data.rows.item(i).id;
            let message_to = data.rows.item(i).message_to;
            let message_text = data.rows.item(i).message_text;
            this.messages.push({
                id: id,
                message_to: message_to,
                message_text: message_text
            });
          }
        })
        .catch(e => console.log(JSON.stringify(e))); // ERROR HERE
    })
    .catch(e => console.log(JSON.stringify(e)));
  }
}

Now i get an error in my first catch:

{"__zone_symbol__currentTask":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"angular","cancelFn":null,"runCount":0}}

I can’t really understand whats going on about that execution.
Where i’m going wrong?
Thank you for help.

Posts: 1

Participants: 1

Read full topic

Viewing all 49083 articles
Browse latest View live


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