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

How to get cached view entered event?

$
0
0

@aniketgundecha wrote:

– Lets say there is a tabview and then i do a push for entering in a new view…
– While i’am on the psuhed view i click back button which take me to the tab view page

Now i need this event that when a back button is clicked and the person goes to the cached view below is what i tried

ionViewDidLoad() {
console.log(‘ionViewDidLoad Dashboard’);
}

 ionViewWillEnter() {
    console.log("Entered Dashboard");
}

ionViewDidEnter(){

console.log(“Entered Dashboard”);
}

Posts: 1

Participants: 1

Read full topic


Comand line ionic login don't work

$
0
0

@NFB wrote:

Hi,

I have a count in ionic framework and when i’ll try login from cmd (ionic login).
This is the response:

Request: POST https://api.ionic.io/login
Response: 404
Body:
{ type: ‘NotFound’,
message: ‘No user found by that email’,
link: null }

And when i login in web page i don’t have any problem.

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

@ionic/cli-utils  : 1.14.0
ionic (Ionic CLI) : 3.14.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.1

System:

Node  : v6.11.3
npm   : 3.10.10
OS    : OS X El Capitan
Xcode : Xcode 7.3.1 Build version 7D1014

Misc:

backend : legacy

Thanks.

Posts: 1

Participants: 1

Read full topic

Real time push notifications

$
0
0

@mfouash wrote:

hi,
i finished build my real time ionic 3 firebase chat app
but i need to add some enhancement to my app
i need when some one send message to another user who is offline to send a notification to that user
with new message like other free message apps
any suggestion please
thanks

Posts: 1

Participants: 1

Read full topic

Using firebase database value as argument of function

$
0
0

@soo wrote:

Hi,
I have one firebase database, name branch, one of the key(phone) has value(607123456),
Inside html page, I can use {{ (branch | async)?.phone }} to get the value.
But now I have a function “callUs(stringNumber)”, how do I use {{ (branch | async)?.phone }} as the argument of this callUs function? So that I can pass different phone number to this function.

“callUs({{ (branch | async)?.phone }})” gets a template syntax error.

Somebody help. Thank you

Posts: 1

Participants: 1

Read full topic

Cannot read property 'country_name' of undefined

$
0
0

@Prakashreddy wrote:

home.ts

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Http, Response } from '@angular/http';
import 'rxjs/add/operator/map';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  private apiurl = 'http://34.215.46.34/api.php?q=';
  data: any = {};

  constructor(public navCtrl: NavController, private http: Http) {
    console.log("Countries api");
    this.getcountry();
    this.getdata();
  }

  getdata(){
    return this.http.get(this.apiurl)
    .map((res: Response) => res.json())
  }
  getcountry(){
    this.getdata().subscribe(data =>{
      console.log(data);
      this.data = data
    })

  }

}

home.html

<ion-header>
  <ion-navbar>
    <ion-title>
      Ionic Blank
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
    <ion-list>
  <ion-item *ngFor="let countries of country">
    </ion-item></ion-list>
    <h2>{{countries.country_name}}</h2>
  </ion-content>

can anyone help me with this

Posts: 2

Participants: 2

Read full topic

Ionic Cordova Build Android -- Prod issue

$
0
0

@kprakash wrote:

Error: ./src/app/app.module.ngfactory.ts
Module not found: Error: Can’t resolve ‘@angular/compiler/compiler’ in 'D:\MobileRD\BARMobileClient\src\app’
resolve ‘@angular/compiler/compiler’ in 'D:\MobileRD\BARMobileClient\src\app’
Parsed request is a module
using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./src/app)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./src/app)
resolve as module
looking for modules in D:\MobileRD\BARMobileClient\node_modules
using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./node_modules)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: D:\MobileRD\BARMobileClient\package.json (relative path: ./node_modules)
using description file: D:\MobileRD\BARMobileClient\node_modules@angular\compiler\package.json (relative path: ./compiler)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.json doesn’t exist
as directory
D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler doesn’t exist
[D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler]
[D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.ts]
[D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.js]
[D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler.json]
[D:\MobileRD\BARMobileClient\node_modules@angular\compiler\compiler]
@ ./src/app/app.module.ngfactory.ts 155:0-51
@ ./src/app/main.ts

Kindly help us on this issue.

Posts: 1

Participants: 1

Read full topic

Insert string with quotes in SQLite

$
0
0

@anton_klochko wrote:

Hi all ! I Could anyone suggest please … how to insert string with quotes ? I am using SQLite … if exists any method ?

Posts: 1

Participants: 1

Read full topic

How to disable print preview before printing

$
0
0

@veerajshenoy wrote:

Hey guys. Have Developed a POS application using ionic framework. I want the printout to come directly without print preview. Have tried disable print preview and kiosk arguments before loading chrome but then the windows native printer dialog shows up. Also selected print directly in windows 10 printer settings from control panel. But the native dialog still shows up

Posts: 1

Participants: 1

Read full topic


Ionic-v1 : Bug build release

$
0
0

@Boyban wrote:

Hi all,

Actually, I meet a problem in Ionic.
I want to deploy my app on store, but I seen my app was totally unusable when I use --release flag to compile.
I signed my app with jarsigner and zipalign. When I compile my app without flag --release, my app is OK and works normally.

Anyone can help me ?

Posts: 1

Participants: 1

Read full topic

Problem with CloudinaryModule when building the ionic app

$
0
0

@jooo13 wrote:

When I build my ionic app to generate the android apk , i have this error

Error: Error encountered resolving symbol values statically. Expression form not supported (position 161:44 in the original .ts file), resolving symbol AppModule in D:/projet/src/app/app.module.ts
in line 161:44 in module.ts

In the line 161:44 in module.ts , I have this :


CloudinaryModule.forRoot({Cloudinary}, { cloud_name: 'duw0ariuf' } as CloudinaryConfiguration),

Can someone help please.

Posts: 1

Participants: 1

Read full topic

Writefile is still not working

$
0
0

@Gecko98 wrote:

Hello Everybody,
I am new to working with Ionic and I need help.
My code is still not working.

I would like to save data in a Datafile.

My first step:
$ ionic cordova plugin add cordova-plugin-file
$ npm install --save @ionic-native/file

In app module.ts
providers: [
StatusBar,
SplashScreen,
File,
{provide: ErrorHandler, useClass: IonicErrorHandler},

After that in mitglied.ts
import { File } from ‘@ionic-native/file’;

constructor(public navCtrl: NavController, public navParams: NavParams, private alertCtrl: AlertController, public file: File) {
}

My method
close(){

this.file.writeFile(this.file.externalRootDirectory, ‘mydir.txt’, ‘Test’ ,{ replace: false, append: true });

}

Thank you for your support :wink:

Posts: 1

Participants: 1

Read full topic

This.http.post complex object to ASP.NET WebAPI method

$
0
0

@XenC wrote:

This message is directed to the creators of Ionic.

There seems to be a lot of answers but no real solutions to a problem I am trying to solve. So the problem is:
Please indicate by way of example (ionic 2+) with Typescript how to construct a complex object before sending this object to this.http.post method.
Also please indicate MIME-TYPE /CONTENT TYPE as well.
If you have the example of the receiving method ASP.NET WepAPI that would be surely welcome.

Thank you.

Posts: 1

Participants: 1

Read full topic

Why is promise.all ([ tuti,tuti2] ) firing once?

$
0
0

@noutcharty wrote:


i tried this tutorial to get markers added on the map everything’s working fine but
when i navigate to other pages and then return to map page markers don’t appear ,only the first time need help …
i’m using menu to navigate through pages i tried everyhting even putting the method in the constructor and tried all the functions :
ionViewDidLoad() ,ionViewWillLoad(),ionViewDidEnter()…i’m helpless right now !! this is my method:

 ionViewDidLoad(){
       this.platform.ready().then(() => {
            let mapLoaded = this.maps.init(this.mapElement.nativeElement,
              this.pleaseConnect.nativeElement);
            let locationsLoaded = this.load();
        Promise.all([
            mapLoaded,
            locationsLoaded,
            ]).then((result) => {
        if(result){
           let locations = result[1];
                for(let location of locations){
                  this.maps.addMarker(location);
                 }
        this.maps.addMyPosition();
               });
    });

}

Posts: 1

Participants: 1

Read full topic

APP only works the first time on iOs

$
0
0

@antony2809 wrote:

Hi, im having a problem since I’m trying to test my app on iOS.

The first time I install my app on an emulator/device the app works correctly. But if I close my app, and open again the app don’t work anymore and get stuck on the white screen forever.

My ionic info is:

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

    @ionic/cli-utils  : 1.14.0
    ionic (Ionic CLI) : 3.14.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : ios 4.5.2
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node  : v8.7.0
    npm   : 5.4.2
    OS    : macOS Sierra
    Xcode : Xcode 9.0 Build version 9A235

Misc:

    backend : pro

I tried so many solutions, like remove and add de platforms, remove and add de plugin one by one. The app works on Android perfectly, but on iOS I have this problem.

Can someone help me?

Posts: 1

Participants: 1

Read full topic

Angular animations

$
0
0

@jiosush wrote:

Hi , Does angular “leave” animations only works with *ngIf ?? I am trying to implement animations to a card on dismissal (when user clicks on cancel button present on the card) with *ngFor . Don’t want to use *ngIf for this. How to achieve this??

Posts: 1

Participants: 1

Read full topic


Ion-grid Ui designing help needed for responsive ness in different devices?

Git CLI not found on your PATH

$
0
0

@anandraj1411 wrote:

Hi All,

Please help me to solve the issue “Git CLI not found on your PATH. It must be installed to connect this app to Ionic.”. I am totally stuck with this.

Thanks and Regards
Anand Raj

Posts: 1

Participants: 1

Read full topic

So, should I really wait for the network available?

$
0
0

@jiotaro wrote:

Some code first, this is from a small provider I created for data synchronization process,

import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { Subscription } from "rxjs/Rx";

import { Platform, AlertController } from "ionic-angular";

import { Network } from "@ionic-native/network";
import { Storage } from "@ionic/storage";

import { UnderDevelopment } from "../under-development";
import { ApiServicesProvider } from "../../providers/api-services/api-services";

import * as moment from "moment";

@Injectable()
export class DataSyncProvider {

  connected: Subscription;
  disconnected: Subscription;

  constructor(
    public plfm: Platform, public net: Network,
    private undev: UnderDevelopment,
    private storage: Storage,
    private alertCtrl: AlertController,
    private api: ApiServicesProvider) {

  }

  stop() {
    this.connected.unsubscribe();
    this.disconnected.unsubscribe();
  }

  setup() {

    this.net.onchange().subscribe((...data) => {
      console.log(JSON.stringify(data));
      this.undev.addLater("What the heck...? " + this.net.type);
    });

    this.connected = this.net.onConnect()
      .subscribe(result => {
        console.log(JSON.stringify(result));
        this.alertCtrl.create({
          title: 'Available network',
          message: 'Synchronize offline data before continuing using.',
          buttons: [{
            text: 'Sync',
            handler: () => this.loadSchedules()
          }]
        });
      });

    this.disconnected = this.net.onDisconnect()
      .subscribe(result => {
        console.log(JSON.stringify(result));
        this.alertCtrl.create({
          title: 'Offine network',
          message: 'Consecutive data changes will be saved offline.',
          buttons: [{
            text: 'Acknowledge',
            handler: () => this.undev.addLater('Now storing data offline!')
          }]
        })
      });
  }

  loadSchedules() {

    var today = moment().format("YYYY-MM-DD");

    this.undev.addLater(`Loading schedules today: ${today}`);

    // TODO: real request here
    // this.storage.set('db.synced', true);

  }

}

As you can see, those two onConnect() and onDisconnect() work badly!
I can see lots of people struggle on this issue lately
(well, I didn’t add setTimeout(...) like the API document suggests, just because it’s makes me wait like forever)

But unexpectedly, that onchange() works great! It just gives right values at right time,
of course when network connection is truly available

so what you guys think?

Posts: 1

Participants: 1

Read full topic

Problems to update using Firebase inside a callback function

$
0
0

@castro_felipe wrote:

Hi guys,

I am trying to get and save an user TokenID that FCM (Firebase Cloud Messaging) provides to me when an user authenticates in my app in my Firebase database. The problem i have is that in setToken(), Ionic is not recognizing functions that i created to work with firebase database.

My home.ts code is here: https://pastebin.com/hs54d1gX![FB_IMG_1508845133145|690x128]

The error returned.

My objective is just obtain TokenID from FCM and store this info in Firebase.

Posts: 1

Participants: 1

Read full topic

Building application, images not loaded from `.scss` files

$
0
0

@jiotaro wrote:

Hi everyone,

I just just started with Ionic more than a week ago, and I started to like it, as I already have some experiences with Javascipt/NodeJS, and a bit of Angular.

I got few pages work perfectly, but the problem is when building into apk (I’m working only on Android for now), those images defined in .scss files are not loaded.
I see that only those embedded in img or ion-img elements are working.

anyone encounters this issue?

Posts: 2

Participants: 2

Read full topic

Viewing all 70889 articles
Browse latest View live


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