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

Type 'GeolocationOriginal' is not assignable to type 'Provider'

$
0
0

@aditbharadwaj wrote:

whenever i try to add geolocation under providers it give me this error “Type ‘GeolocationOriginal’ is not assignable to type ‘Provider’” i have imported the right geolocatin plugin.
can any1 help ?

update i solved it
*i need to add /ngx in import i think its related to ionic 4 *

Posts: 1

Participants: 1

Read full topic


How to retrieve multiple values from selected checkbox?

$
0
0

@harshm90 wrote:

<ion-item no-lines *ngFor="let details of size; let i=index" style="font-size: 12px;">

        <ion-checkbox item-left formControlName="size" (ionChange)="selectSize(details.size, $event)">
        </ion-checkbox>

        <ion-label>
          <ion-row>
            <ion-col col-6>
              <h5>{{details.size}}</h5>
            </ion-col> 
            <ion-col col-2 >
              {{details.pretty_price}}
            </ion-col>
          </ion-row>
        </ion-label>
      </ion-item>

I get the value of details.size but how can i retrieve prices along with sizes when user selects any checkbox?

Posts: 1

Participants: 1

Read full topic

Add hook to every page

$
0
0

@tfrutuoso wrote:

Hi Everybody!

I am building an ionic app, and I have a concern regarding the proper function of it.

My app has a login feature, and I need to get an authentication token from a server in order to make the subsequent calls to it.

For this purpose, I’d like to ensure that I have this authentication token in everyone of my pages, so that if I check on the dashboard page the authentication token and it doesn’t exists, I’ll redirect the user to the login page.

Is there any way to create a hook in some kind of “global” page, or in the class where my pages are inheriting it’s class? I know I could use the ionic lifecycle and hook there my login verification, but if I do it this way, I’d have to check on every one of my new pages, and I will be not following the DRY principle. I’d rather like to put a method on the app.component.ts file, and hook the method on that file. Is it possible?

Best,

Posts: 1

Participants: 1

Read full topic

Google Maps BaseClass ERROR

$
0
0

@juanma97 wrote:

Good morning, I have a problem with Google Maps, all work correctly with ‘ionic cordova run browser’, but with ‘ionic serve’ not work in mobile phone, I want execute in mobile Android, real device. And I have the next error:

core.js:15714 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'BaseClass' of null
TypeError: Cannot read property 'BaseClass' of null
    at GoogleMap.BaseClass (index.js:246)
    at new GoogleMap (index.js:1094)
    at GoogleMapsOriginal.create (index.js:203)
    at EventDetailsPage.webpackJsonp.166.EventDetailsPage.loadMap (event-details.ts:47)
    at event-details.ts:31
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (core.js:17289)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3
    at c (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.js:17280)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)
    at o (polyfills.js:3)
    at e.invokeTask [as invoke] (polyfills.js:3)
    at p (polyfills.js:2)
    at HTMLImageElement.v (polyfills.js:2)

How I execute in mobile phone?

I have google-maps 5.0.0 beta 22

And the file .ts here:

import { Component, ViewChild, OnInit } from '@angular/core';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { GoogleMaps, GoogleMap, GoogleMapOptions, Environment } from '@ionic-native/google-maps';

@IonicPage()
@Component({
  selector: 'page-event-details',
  templateUrl: 'event-details.html',
})
export class EventDetailsPage{

  @ViewChild('map') element;
  map: GoogleMap
  event: any;
  slideOpts = {
    effect: 'flip'
  };

  constructor(public navCtrl: NavController, 
    public navParams: NavParams, 
    public platform: Platform) {
    this.event = navParams.data;
  }

  goBack() {
    this.navCtrl.pop();
  }  

  ngAfterViewInit() {
    this.platform.ready().then(() => {
      this.loadMap();
    });
  }

  loadMap() {
    let mapOptions: GoogleMapOptions = {
      camera: {
        target: {
          lat: this.event.latitude, // default location
          lng: this.event.longitude // default location
        },
        zoom: 18,
        tilt: 30
      }
    };
  
    this.map = GoogleMaps.create('map_canvas', mapOptions);
  }


}

Thank you!

Posts: 1

Participants: 1

Read full topic

Converting a piece of code from Ionic 3 to Ionic 4

$
0
0

@Sargo wrote:

Hi,

I’ve been trying to convert an Ionic3 project to Ionic4. I’ve been having a bit of trouble since the navParams don’t work the same way as they used to. This is the piece of code I want to change from Ionic3 to Ionic4.

let localData = http.get(‘assets/mylist.json’).map(res => res.json().items);
localData.subscribe(data => {
this.information = data;
for (var i = 0; i < this.information.length; i++) {
this.information[i].open = false;
}
this.toggleSection(navParams.data);
})

It loops through the Json and parses the information to an accordeon list.

I’ve tried this, but with no luck:

Posts: 1

Participants: 1

Read full topic

Ionic 4 form highlight on ios

$
0
0

@adsfelipe wrote:

Hello, in ionic 3 the input highlight only work on Android, so to add this to IOS it needed

$text-input-ios-show-focus-highlight: true;

But how can i do this on ionic 4?
couldn’t find anything on docs…
thanksss

Posts: 1

Participants: 1

Read full topic

Fetching WordPress rest API working on Browser but not on Device (CORS Enabled)

$
0
0

@condacore wrote:

Hey,

I’m using Ionic 4 + Angular 7 (HttpClient) to fetch JSON data from my WordPress installation. There isn’t a problem if the App runs in Browser or via --livereload. CORS also is enabled on my Server.

But if I finally build the app with Cordova (iOS), the data isn’t loading anymore. I see a http request on my server and the app seems to receive the data. But it isn’t displayed anymore. With static JSON files or with the Google Maps API everything works fine. It seems to be a problem with wordpress combined with Cordova. (Using Cordova iOS 5.0.0).

All Plugins and node modules are up to date. Whitelist Plugin is installed and configured and even the Content-Security-Policy meta tag is present.

Someone else facing this issue?

Best Regards
Marius

Posts: 1

Participants: 1

Read full topic

Scheduler view to show conference room available in ionic 3/4


Web API in Ionic-Native

$
0
0

@TayKara wrote:

Hello,
First, I have to prevent you that I’m not an english speaker, so excuse me if I write like a kid :slight_smile:
I’m working on a Progressive Web App that purpose some functionnality, like using camera, receiving and sending notifications with firebase, recognize speech, read sensors in real time, etc.
But quickly, I was stopped by PWAs’ limitation. I wanted to read sensors in background, but it seems like it’s actually impossible, because the API is not usable in a Web Worker. (I’ve posted a message in stackoverflow : here , and I’m waiting for a response so if you have an idea to resolve my problem, I will appreciate the help).

Because of this, I have to build my PWA to an Hybrid App, I tought that it would be easy but it wasn’t.
So in brief, I would like to have a PWA AND a Hybrid App. For example, I’m unable to use Firebase in Hybrid, because I use the official Firebase package and not ionic-native/cordova…

In the PWA version I want to do everything that’s possible to do, and in the Hybrid App version, I want to do all of PWA functionnalities plus what’s not possible to do (like reading sensors in background).
The problem is that I use a lot of Web Oriented API in my PWA (SpeechRecognition, Mediacapture, Firebase, etc), and I can’t use some of them in the Hybrid Version.

So my question is : how could you do to implemant same functionnalities in both PWA and Hybrid versions ?

One more time, I apologize for my poor english, tell me if you didn’t understand something or if you wan’t more precisions, I will respond you with pleasure.

Posts: 1

Participants: 1

Read full topic

How to implement notification(Like:facebook notification) in ionic3 app?

$
0
0

@RomnEmpire wrote:

Hi to all,
I have to implement notofication in our app.tell m which notification we have to used.in our app we have sent notification to another user after user request is accept in ionic3.tell m anyone how to implement this type of notification?

Posts: 1

Participants: 1

Read full topic

Attaching Cookie from in App Browser to application calls

$
0
0

@johnhohm wrote:

We are implementing social auth with instagram as well as facebook, and likely more in the near future. We utilized the facebook plugin for native and it works great, however IG does not appear to be supported natively in V4 and we did our own auth service through our backend servers and an in app browser, however we are unable to attach the cookie from the auth request to the application so subsequent calls to the server after are not authenticated.

Does anyone have any suggestions of a better way to do this or a way to get the cookie?

Posts: 1

Participants: 1

Read full topic

Is it possible to adjust the LOCAL_ID per page

$
0
0

@WebmasterAB wrote:

I now have the LOCAL_ID for the whole app in app.module.ts and it works.

But it can also be separate for each page.
So that I can use it to translate the dates.

Posts: 1

Participants: 1

Read full topic

How to get multiple image from the server in ionic app?

$
0
0

@gokujy wrote:

Hello, I want to get multiple images from the server in my app. So for this, I tried this code:

<div class="one-image" *ngFor="let image of [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]">
<img src="http://mysite.co.in/ionic/{{image}}.jpg">
</div>

Here I have a working code, this way everything working fine but if I have more then 100 images in a folder at that time what to do? every time write image number is not good or is there any way to get all image from a folder in app…please help :slight_smile:

Posts: 1

Participants: 1

Read full topic

Parcel instead of webpack

$
0
0

@pupeter wrote:

Hi there,

I´m building ionic applications at least for 2 years and always used webpack to build the application.
In the last few weeks I read a lot about parcel, but newer tried it especially not in an ionic application.
I would be very happy if anyone has experience with parcel and ionic and can share their experience.

Posts: 1

Participants: 1

Read full topic

URL of the Privacy Policy facebook

$
0
0

@Ludolefrenchy wrote:

Hello,
for the connection of my app I followed this tutorial but my problem is that facebook asks me url privacy policy, my app will only be on mobile so how do I get this URL?

Thanks in advance Ludo

Posts: 2

Participants: 2

Read full topic


[v4] Uglify is not executed (Dropping console)

$
0
0

@domwoe wrote:

Hi,

I want to get rid of console logs in production. Therefore, I’ve added the following line to package.json

"config": {
    "ionic_uglifyjs": "./config/uglifyjs.config.js"
  },

The content of the file is the following

module.exports = {
    compress: { drop_console: true }
}

when running

ionic cordova prepare ios --prod --release --verbose

there is no output related to uglifyjs and the console.logs are still there.

Does anyone know whats wrong?

Best,
Dominic

Posts: 1

Participants: 1

Read full topic

Add,Delete and Retrive data from cloud firestore in ionic 3

$
0
0

@mayureshp wrote:

How to add ,delete and retrive data from cloud firestore in ionic 3?
can anyone please send one example

Posts: 1

Participants: 1

Read full topic

Build fails when app is sub-directory in github repository

$
0
0

@pjlpjl2 wrote:

I have a github repository and my ionic app is in a sub-directory ("/client"). When I check-in I get a get an error that there is no package.json (because there is none in the root directory)

How do I link a sub directory to appflow so that it will compile the client on checkin.

Posts: 1

Participants: 1

Read full topic

Ionic 4 print css

$
0
0

@vitalikk wrote:

Hello Ionic community,

I’m using Ionic v4 (latest version) to build a Chrome extension, everything works fine so far except print functionality. To allow users print their page, I’m opening the result page in a separate tab and use browsers default functionality window.print() to generate print preview.
The result page contain multiple ion-list elements each with around 15 to 20 ion-item + ion-card elements (example see attachment

)

Now, the print preview shows only the first page. Is there any CSS hacks to make the print page show the whole content?

What I’ve already tried (nothing works for me right now):

  • Several solutions for ionic v3
  • dom-to-image solution

Thanks in advance!
Vitali

Posts: 1

Participants: 1

Read full topic

Firebase google auth not authorised on ios, but is on android

$
0
0

@MSC29 wrote:

Hi,
My app uses facebook & google sign in with firebase signInWithRedirect.

It works perfectly on an android device, but not on iOS.
On iOS I’m getting

Auth/operation not supported in this environment
This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled.

It’s important to note that login password authentication through firebase works on iOS.

I’ve tried several things, such as adding a GoogleService plist file so that my iOS app would be registered at Firebase. But it doesn’t seem to be picked up in XCode.
Not sure how this works, because the firebase javascript config object has nothing to do with the platform… maybe I’m missing something here…

I’ve tried to use in-app-browser too, but no luck either.

This works on android

<access origin="*" />
    <allow-navigation href="*" />
    <allow-intent href="*" />

Can somebody think of something I’m missing at all?

Thanks a lot
Regards

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>