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

How to use Rendertron with Ionic

$
0
0

@lucio-ribeiro wrote:

Hi guys!

I’m new to ionic framework but i’m trying to follow some steps to accomplish that an ionic app to be indexable by google seo.

On the web i found a solution called “rendertron” supplied by google and also a guide to implement it.

https://codelabs.developers.google.com/codelabs/dynamic-rendering/

If i’m right, i need to place the code on step 5 to an node express server.

but the question is.

I’m hosting my ionic app on Azure so, how can I achieve this task ?

Posts: 1

Participants: 1

Read full topic


Manage accounts

$
0
0

@ChristyMathews wrote:

Please share your ideas OR provide links if available. I need an account manager like facebook and gmail for my project but I can find such a plugin.

Posts: 1

Participants: 1

Read full topic

IONIC 4: Device back button not exiting the app

$
0
0

@augustofrr wrote:

I’ve been trying to close the app with the device back button but instead of, it goes to a white screen and then go back to the home page.
I tried this:

import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  constructor(private platform: Platform) {}

  subscription: any;

  ionViewDidEnter() {
    this.subscription = this.platform.backButton.subscribe(() => {
      navigator['app'].exitApp();
    });
  }

  ionViewWillLeave() {
    this.subscription.unsubscribe();
  }
}

It seems to work to some people, there’s something wrong i’m doing?

Posts: 1

Participants: 1

Read full topic

Events Pub/Sub Unsubcribe a function when leave page

$
0
0

@elidjeaka wrote:

I’m designing a chat application and so receive a notification when his correspondent tells him that his correspondent has read the message; For this, my message contains three properties: message, status (false or true), sendby, timestamp. By default when a message is sent, the status is false. and when its match puts the focus in the message writing area, the status is changed to true. The problem is that after that the status does not return to false, it remains. Need help
Here is my code to update message status

updateStatusMessage() {
    var promise = new Promise((resolve, reject) => {
      let temp;
      this.firebuddychats.child(firebase.auth().currentUser.uid)
        .child(this.buddy.uid).orderByChild("status")
        .equalTo(false).on('value', (snapshot) => {
          temp = snapshot.val()
          console.log(temp)
          if (temp) {
            for (var tempkey in temp) {
              if (tempkey) {
                let t = JSON.parse(JSON.stringify(temp[tempkey]))
                console.log(tempkey)
                this.firebuddychats
                  .child(firebase.auth().currentUser.uid)
                  .child(this.buddy.uid)
                  .child(tempkey).update({
                    status: true
                  }).then(() => {
                    console.log("test 1", t)
                    resolve({ success: true })
                  })
                  .catch((err) => {
                    reject(err)
                  })
              }
            }
          }
        })
    })
    return promise;
  }

This code is call when I put focus in the input text

<ion-input [(ngModel)]="newmessage" placeholder="Saisir votre message ..." (ionFocus)="hasread()" (focusout)="hasnotread()"></ion-input>  
    <ion-buttons end>
      <button ion-button (click)="addmessage()">
        <ion-icon name="send" color="primary"></ion-icon>
      </button>
    </ion-buttons>

here is my code , I call it to get all friends and get notifications

await this.events.subscribe('friends', async ()=>{
      this.myfriends = [];    
      this.myfriends = await this.requestsService.myfriends;
      this.myfriends.forEach(friend => {
        this.notreadbyfriend = []
        console.log(this.notreadbyfriend)
        if (friend.uid) {
          
          this.chatService.countnotreadmessages(friend.uid) // rechercher le nombre de messages non lus envoyés par l'utilisateur
          this.events.subscribe('nbmessage', async (tab) => { // récupération de cette valeur et attribution de la valeur à l'objet 
            console.log("jkjhkj",this.chatService.tab_notreadfriend)
            if (this.chatService.tab_notreadfriend.length>0){ 
            this.notreadbyfriend = await this.chatService.tab_notreadfriend
            let tab_people_not_read = this.notreadbyfriend.filter((element) => element.nb > 0)
            this.nb_people_not_read = tab_people_not_read.length
            this.events.publish("notreadnb", this.nb_people_not_read)
            }
          })
        }
      })
    })   

here is my code to send new message

addnewmessage(msg){
    if(this.buddy){
      var promise = new Promise((resolve, reject)=>{
        this.firebuddychats.child(firebase.auth().currentUser.uid)
        .child(this.buddy.uid)
        .push()
        .set({
          sentby:firebase.auth().currentUser.uid,
          message:msg,
          status: true,
          timestamp:firebase.database.ServerValue.TIMESTAMP
        }).then(()=>{
          this.firebuddychats.child(this.buddy.uid).child(firebase.auth().currentUser.uid)
          .push()
          .set({
            sentby: firebase.auth().currentUser.uid,
            message: msg,
            status:false,
            timestamp: firebase.database.ServerValue.TIMESTAMP
          }).then((data)=>{
            console.log(data)
            this.countnotreadmessages(this.buddy.uid)
            resolve(true)
          }).catch((err)=>{
            reject(err)
          })
        })
      })
    }
    return promise;
  }

for first time, if somebody send a message to a buddy, buddy receive a sending notification but if buddy would to reply after end leave the reply page
my code continue to update status message
Need Help

Posts: 1

Participants: 1

Read full topic

IONIC 4: ion-router-outlet jumps past specified url

$
0
0

@lancechantiles wrote:

I am using ion-router-outlet for navigation in my Ionic 4 app and it appears when using navigateByUrl it keeps past pages open as shown here (app-start [first page] and app-join-start [second page]):


This wouldn’t be a problem except after enough pages are loaded the functions on hidden pages are triggered which causes navigation to navigate to the correct page and then jump to another page. So for example if navigating from another page back to app-start it would load app-start and then load app-join-start right afterwards. The functions that seem to be navigating to the wrong next pages are called in the constructors of the hidden pages.

I am using “@angular/core”: “^7.2.2” and @ionic/angular": “^4.6.0”

Thank you so much!

Posts: 3

Participants: 2

Read full topic

Cannot find name 'ErrorHandler'

$
0
0

@ab2211 wrote:

I have the error message “ERROR in src/app/app.module.ts(20,15): error TS2304: Cannot find name ‘ErrorHandler’.
[ng] src/app/app.module.ts(20,39): error TS2304: Cannot find name ‘IonicErrorHandler’.” following the docs “build your first app” after inserting " ```
providers: [
StatusBar,
SplashScreen,
Camera,
{provide: ErrorHandler, useClass: IonicErrorHandler}
],

What can I do?

Posts: 1

Participants: 1

Read full topic

Cannot interact with a button inside ion-item when there's also an ion-select

$
0
0

@jwleigh wrote:

I have an ion-item that has both an ion-select and an ion-button within it:

HTML

      <ion-card>
        <ion-item>
          <ion-label>Leadership:</ion-label>
          <ion-select
            formControlName="leadershipRating"
            class="status-selector"
            interface="popover"
          >
            <ion-select-option value="above-expected"
              >Above Expected</ion-select-option
            >
            <ion-select-option value="Expected">Expected</ion-select-option>
            <ion-select-option value="below-expected">Below Expected</ion-select-option>
          </ion-select>
          <ion-button item-right (click)="toggleComment($event, 'leadership')" color="primary">
              <ion-icon name="document"></ion-icon>
            </ion-button>
          </ion-item>
        <ion-item *ngIf="show.leadership">
          <ion-label>Note:</ion-label>
          <ion-input
            formControlName="leadershipNote"
            type="text"
            placeholder="Required for rating other than Expected"
          ></ion-input>
        </ion-item>
      </ion-card>

TS

  toggleComment($event, category) {
    console.log('toggle comment');
    this.show[category] = !this.show[category];
  }

It looks like this:

But I can’t click the button at all. Any clicks, anywhere inside the ion-item triggers the ion-select to pick an option. Even with the (click) set on the button it never triggers at all.

In the past such things would trigger both the button and the select and I’d use stopPropagation to make sure a click on the button only triggers that. But now the button does nothing.

If I move the button outside of the ion-item that has the ion-select then the button clicks the way its supposed . But then of course its no longer to right of the select but on a new line (which I don’t want).

ionic info:

Ionic:

Ionic CLI : 5.2.3 (/Users/jeffreyleigh/.nvm/versions/node/v10.15.3/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.2
@angular-devkit/build-angular : 0.7.4
@angular-devkit/schematics : 0.7.4
@angular/cli : 6.1.4
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : not available
Cordova Plugins : not available

Utility:

cordova-res : 0.5.2 (update available: 0.6.0)
native-run : 0.2.7 (update available: 0.2.8)

System:

ios-deploy : 1.9.2
NodeJS : v10.15.3 (/Users/jeffreyleigh/.nvm/versions/node/v10.15.3/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8

Posts: 1

Participants: 1

Read full topic

Ionic 4 PWA

$
0
0

@KasunGamage wrote:

Hi guys, did anyone know how to prompt add to screen modal in safari browser(ios device) in the progressive web app?

Posts: 1

Participants: 1

Read full topic


Charging stripe token in ionic 4

$
0
0

@Hammad6264 wrote:

Hi friends, hope you will fine;. actually i’m working with ionic 4 app for woocomemrce. I want to integrate stripe in my app. I succesfully be able to create the stripe token, now i want to charge it. I don’t know how to do that. Someone help me please. Thanks!

Posts: 1

Participants: 1

Read full topic

How to get local notification when new document on firestore? Ionic 4

$
0
0

@Manel00 wrote:

Hi everybody, i’m trying to put a local notification when some new document (no matter the document) is added on the collection, but it’s hard because i cannot understand how to use Node.js code with Ionic 4 (for to trigger on index.js when there is a new document on the collection, but then i have to cast a local notification on app.component.ts… so i cannot understand how to do that…) Thank you very much

Posts: 1

Participants: 1

Read full topic

iOS page transitions show old page under the new page for a short period

$
0
0

@peterjc wrote:

A very short and simple question…

Just started testing my Ionic app on iOS after upgrading to Ionic 4, and I have notices, when I transition to a page, eg using navigateForward, I still seem to see the old page under it for just around 1 second, so for a very short while, graphics looks mixed up.

Have the following evn…

onic:

   Ionic CLI                     : 5.2.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.6.2
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (/Users/Development/.android-sdk-macosx/)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v10.15.3 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : macOS High Sierra
   Xcode             : Xcode 9.4.1 Build version 9F2000

Has anyone else noticed this, or perhaps know a way around it?

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Ngx/translate and cordova-plugin-globalization

$
0
0

@roy800227 wrote:

I want to according device language translate text in APP.
I find two plugin ngx/translate and cordova-plugin-globalization,I want to achieve the above effect, then I have to choose which plugin or use two together.
Please tell me how to solve this problem?

Posts: 1

Participants: 1

Read full topic

Ionic push notification that triggers when something has changed in mySQL database

$
0
0

@chrissiarivera wrote:

Hi, everyone! Can you all please help me. I’m new to Ionic and I’m currently developing an app that has queueing. One feature of my app is that it will notify the user if he’s close to the queue already or if where he is in the queue. I really don’t know how to do this. My database is mySQL. Any resources would be very helpful. If you can give me an example, the better. Thank you so much!

Posts: 1

Participants: 1

Read full topic

How to play with firebase-functions on Ionic 4?

$
0
0

@Manel00 wrote:

Hi everyone,

I’m trying to show a local notification when there is a new firestore document on 1 collection, but i’m getting the error when i import into .ts this:

[ng] ERROR in node_modules/firebase-functions/lib/function-configuration.d.ts(4,64): error TS1005: ']' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(4,66): error TS1134: Variable declaration expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(4,153): error TS1005: ';' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,61): error TS1005: ']' expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,63): error TS1134: Variable declaration expected.
[ng] node_modules/firebase-functions/lib/function-configuration.d.ts(16,93): error TS1005: ';' expected.

My code on TS:

import * as functions from 'firebase-functions';
 initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      this.activateNotifications();
    });
  }

  activateNotifications() {
    var x = functions.firestore
      .document('objects/{wildcard}')
      .onCreate((snap, context) => {
        const data = snap.data();
        const name = data.name
        const title = data.title
        const message = `${name} uploaded ${title}, this one looks interesting :P`
        this.notifications.schedule({
          badge: 1,
          title: 'New OBject!!!',
          text: message,
          foreground: true,
        });
      });
  }

Posts: 1

Participants: 1

Read full topic

If user looged in display home screen

$
0
0

@Harikag wrote:

Hi, I have login screen and chat home screen. If user is logged in I need to show chat home screen otherwise I need to show chat Home screen after login .

So below is the my app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { TetraApp } from './app.component';
import { HttpModule } from '@angular/http';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { MenuProvider } from '../providers/menu/menu';
import { CategoryService} from './app.service';
import { RouterModule, Routes } from '@angular/router';
import { FormsModule} from '@angular/forms';
import {LoginService} from '../pages/login/login.service';
// import {CarouselModule} from "angular2-carousel";
import {chatHomePage} from '../pages/tetrachatHome/chatHome'
import {ChatService} from '../pages/tetrachatHome/chatHomeService';
import { LoginPage } from '../pages/login/login';
import {chatHistoryPage} from '../pages/chatHistory/chatHistoryCompo'
import {ChatHistoryService} from '../pages/chatHistory/chatHistoryService';
import {ExpandableComponent} from '../pages/expand/expandable.component';
import { FCM } from '@ionic-native/fcm/ngx';
import { Network } from '@ionic-native/network/ngx';
import { networkPage } from '../pages/network/networkcompo';
//import { BackgroundMode } from '@ionic-native/background-mode/ngx';

// import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
//import { Input } from '@ionic/angular';
const appRoutes: Routes = [
  
 // { path: 'chat', component: chatHomePage},  
  // { path: 'login', component: LoginPage},
   { path: 'chatHistory/:id', component: chatHistoryPage},
   { path: 'network', component: networkPage}

];

@NgModule({
  declarations: [
    TetraApp,
    chatHomePage,
    networkPage,
  //   LoginPage,
    chatHistoryPage,ExpandableComponent
  ],
 
  imports: [
    BrowserModule, RouterModule.forRoot(appRoutes),
    IonicModule.forRoot(TetraApp),
    HttpClientModule,FormsModule,HttpModule
    //,CarouselModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    TetraApp,
    chatHomePage,
    networkPage
  ],
  providers: [
    StatusBar,
    SplashScreen, HttpClient,
    MenuProvider, CategoryService,LoginService,ChatService,ChatHistoryService,FCM,
    Network,
   // BackgroundMode,
    //LocalNotifications,
    { provide: ErrorHandler, useClass: IonicErrorHandler }
   
  ]
})
export class AppModule { }

this is app.component.ts

import { Component, ViewChild } from '@angular/core';
import { Nav, Platform, MenuController } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { MenuProvider } from '../providers/menu/menu';
import { CategoryService } from './app.service';

import { chatHomePage } from '../pages/tetrachatHome/chatHome';
import { LoginPage } from '../pages/login/login';
import { LoginService } from '../pages/login/login.service';
import { ExpandableComponent } from '../pages/expand/expandable.component';
import { Network } from '@ionic-native/network/ngx';
//import { BackgroundMode } from '@ionic-native/background-mode/ngx';
//import { LocalNotifications } from '@ionic-native/local-notifications/ngx';ionic cordova plugin add de.appplant.cordova.plugin.local-notification
import { FCM } from '@ionic-native/fcm/ngx';
import { networkPage } from '../pages/network/networkcompo';
//import { FCM } from '@ionic-native/fcm/ngx';
//import { RouterModule, Routes } from '@angular/router';
@Component({
  selector: 'ion-app',
  templateUrl: 'app.html'
})
export class TetraApp {
  @ViewChild(Nav) nav: Nav;
  chatHome = chatHomePage;
  login1 = LoginPage;
  networkScreen = networkPage;
  pages: any;
  public rootPage;
  //TODO: remove coments
  // rootPage: any = 'LoginPage';
 //status regarding notification receive
  notificationAlreadyReceived = false;
  constructor(public platform: Platform,
    public statusBar: StatusBar,
    public splashScreen: SplashScreen,
    public menuProvider: MenuProvider,
    public menuCtrl: MenuController,
    public loginService: LoginService,
    private fcm: FCM,
    private network: Network,
    // public backgroundMode: BackgroundMode,//to make application available on background for any evnets
    //  public localNotifications: LocalNotifications//to generate local notifications
  ) {
    this.isUserLoggedIn();
   // this.initializeApp();

    //subscribe to topic
    this.fcm.subscribeToTopic('topic');
   
    //printing fcm token when received
    this.fcm.getToken().then(token => {
      console.log("fcm token is " + token);
    });

    //executing when platform is ready
    platform.ready().then(() => {
      this.getNetworkConnectivityInfo();
      this.trigger_backgroundEvents();
     
      statusBar.styleDefault();
      splashScreen.hide();
    });



  }
  //based on user login status display login screen or home page.
  isUserLoggedIn() {
    //TODO:remove these comments for testing am hardcoding subbareddya@sathguru.come for user variable
    var user = this.loginService.getUser();
    //var user="subbareddya@sathguru.com";
    
      if(user.length>0){
        debugger;
     this.rootPage= 'chatHomePage';
     console.debug(" user is " + user + " user.length " + user.length);
    //this.nav.push(this.rootPage);
       }
       else{
         debugger;
         console.debug(" new user login " );
    this.rootPage = 'LoginPage';
     }
  }
//responding for background events
  trigger_backgroundEvents() {
    // this.backgroundMode.on('activate').subscribe(() => {
    //   console.log('activated');
    //   if(this.notificationAlreadyReceived === false) {
    //     this.showNotification();
    //   }
    // });

    // this.backgroundMode.enable();
  }

//checking  network for ondisconnect and onconnect 
  getNetworkConnectivityInfo() {

    // watch network for a disconnection
    this.network.onDisconnect().subscribe(() => {
      console.log('network was disconnected :-(');
      this.nav.push(this.networkScreen);
    }, error => console.error(error));

    // stop disconnect watch
    //disconnectSubscription.unsubscribe();


    // watch network for a connection
    this.network.onConnect().subscribe(() => {
      //debugger;
      console.log('network connected!');
      this.nav.pop();
      // We just got a connection but we need to wait briefly
      // before we determine the connection type. Might need to wait.
      // prior to doing any api requests as well.
      setTimeout(() => {
        if (this.network.type === 'wifi') {
          console.log('we got a wifi connection, woohoo!');
        }
      }, 3000);
    }, error => console.error("online error " + error));

    // stop connect watch
    //connectSubscription.unsubscribe();



  }

  showNotification() {
    //  this.localNotifications.schedule({
    //   text: 'You have new message from tetra'
    // });

    //  this.notificationAlreadyReceived = true;
  }

  // initializeApp() {
  //   this.platform.ready().then(() => {
  //     // Okay, so the platform is ready and our plugins are available.
  //     // Here you can do any higher level native things you might need.
  //     // this.getSideMenuData();
  //     // this.getCat();
  //     this.statusBar.styleDefault();
  //     this.splashScreen.hide();
  //     this.getNetworkConnectivityInfo();
  //   });
  // }







  home() {
    this.nav.push(this.rootPage);
  }



  refresh() {
    this.nav.push(this.chatHome);
  }

}

my login.ts is

import { Component,OnInit } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';


import { LoginService } from './login.service';

import { chatHomePage } from '../tetrachatHome/chatHome';
/**
 * Generated class for the HomePage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-home',
  templateUrl:'login.html',
  
})

export class LoginPage {
  rootPage: any = 'Topic1Page';
  banners: any;
  jsonData: any;
  chatHme_Page=chatHomePage;
  constructor(public navCtrl: NavController, public navParams: NavParams,
    public LoginService:LoginService) {
  }  
  
      signIn(id,un,pwd){

        this.LoginService.getCredentials(id,un,pwd).subscribe(response => {
          //this.banners =response.getbannerdataResult.BANNERLIST;
         this.jsonData=response;
          console.log("responce is "+JSON.stringify(response));
          var result=response.response;
 
  if(result=="success"){
      
    this.LoginService.setIp(response.tetra_IP);
    this.LoginService.setPort(response.tetra_PORT);
    this.LoginService.setUser(response.Email);
    this.LoginService.setIncludeUsers(response.users);
   // this.navCtrl.setRoot(this.chatHme_Page);
   this.navCtrl.push(this.chatHme_Page);
  }
  else{
    alert(result);
    console.log("result is not success "+JSON.stringify(response));
   // alert(result);
   
  }
        }
        ,
        (error) => console.log(error));

        }

          
}

It is giving below errors. if I didnt comment the chatHomePage in app.module.ts.

core.js:15724 ERROR Error: Uncaught (in promise): Error: Type chatHomePage is part of the declarations of 2 modules: AppModule and ChatHomePageModule! Please consider moving chatHomePage to a higher module that imports AppModule and ChatHomePageModule. You can also create a new NgModule that exports and includes chatHomePage then import that NgModule in AppModule and ChatHomePageModule.

If I commented the chatHOmePAge in app.module.ts and if user is existed then it is allowing to chat home screen,

with the same If user is not logged in then whenever try to login and after it not allowing to go chat home screen it is giving below error

ERROR Error: Uncaught (in promise): Error: No component factory found for chatHomePage. Did you add it to @NgModule.entryComponents?.

So please help me out. Thanks in advance

Posts: 1

Participants: 1

Read full topic


After I update ionic native things that are package.json, when I build the project, it gives an error

$
0
0

@dogac wrote:

Uncaught Error: Can’t resolve all parameters for MyApp: ([object Object], ?, ?, ?, [object Object], [object Object]).
at syntaxError (compiler.js:485)
at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15700)
at CompileMetadataResolver._getTypeMetadata (compiler.js:15535)
at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (compiler.js:15020)
at CompileMetadataResolver._getEntryComponentMetadata (compiler.js:15848)
at compiler.js:15829
at Array.forEach ()
at CompileMetadataResolver._getEntryComponentsFromProvider (compiler.js:15828)
at compiler.js:15783
at Array.forEach ()

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { Network } from '@ionic-native/network/ngx';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS} from '@angular/common/http';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { LoginPage } from '../pages/login/login';
import { LoginProvider } from '../providers/login/login';
import { ProductInformationPage } from '../pages/product-information/product-information';
import { ProductInformationProvider } from '../providers/product-information/product-information';
import { RequestInterceptorService  } from '../bases/services/RequestInterceptorService';
import { AuthService } from '../bases/services/AuthService';
import { ProductDetailPage } from '../pages/product-detail/product-detail';
import { ProductActionPage } from '../pages/product-action/product-action';
import { SalesReportPage } from '../pages/sales-report/sales-report';
import { SalesReportProvider } from '../providers/sales-report/sales-report';
import { CashierReportPage } from '../pages/cashier-report/cashier-report';
import { CashierReportProvider } from '../providers/cashier-report/cashier-report';
import { ActionReportProvider } from '../providers/action-report/action-report';
import { ActionReportPage } from '../pages/action-report/action-report';
import { AboutUsPage } from '../pages/about-us/about-us';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import {Camera} from '@ionic-native/camera/ngx';





@NgModule({
  declarations: [
    MyApp,
    HomePage,
    LoginPage,
    ProductInformationPage,
    ProductDetailPage,
    ProductActionPage,
    SalesReportPage,
    CashierReportPage,
    ActionReportPage,
    AboutUsPage
  ],
  imports: [
    HttpClientModule,
    BrowserModule,
    IonicModule.forRoot(MyApp,{
      backButtonText: '',
      mode: 'md'
    }),
    FormsModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    LoginPage,
    ProductInformationPage,
    ProductDetailPage,
    ProductActionPage,
    SalesReportPage,
    CashierReportPage,
    ActionReportPage,
    AboutUsPage
  ],
  providers: [
    { provide: "apiUrl", useValue: "http://rxeysws.com:2328" },
    // { provide: "apiUrl", useValue: "http://localhost:2828" },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: RequestInterceptorService,
      multi: true
    },
    Network,
    StatusBar,
    SplashScreen,
    { provide: ErrorHandler, useClass: IonicErrorHandler },
    ProductInformationProvider,
    LoginProvider,
    AuthService,
    SalesReportProvider,
    CashierReportProvider,
    ActionReportProvider,
    BarcodeScanner,
    Camera
  ]
})
export class AppModule { }

here is the my ionic info:
Ionic:

Ionic CLI : 5.2.3 (C:\Users\Dogaç\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1, (and 8 other plugins)

Utility:

cordova-res : not installed
native-run : 0.2.8

System:

NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

After I update ionic native things that are package.json, when I build the project, it gives an error at the top.

Posts: 1

Participants: 1

Read full topic

On Ion-input tag...How can I temporarily hide when user click input box to write sth

$
0
0

@pdj wrote:

I found out that even though user click ion input to write sth, placeholder text remain same…
and when user write somthing, then, placeholder is gone.
how can I hide placeholder when user just click input box. ?

Posts: 1

Participants: 1

Read full topic

Post method in ionic 3

$
0
0

@Tubiss wrote:

ı have laravel json api and works well when ı made auth in laravel post method work nice. but in ionic my codes didnt work.

this is provider

 postData(credentials, type){

    return new Promise((resolve, reject) =>{
      let headers = new Headers({
        'Content-Type' : 'application/json'
      });
      let options = new RequestOptions({ headers: headers });
      
    this.http.post(apiUrl+type, JSON.stringify(credentials), {headers: headers}).
      subscribe(res =>{
        resolve(res.json());
      }, (err) =>{
        reject(err);
      });

    });

  }

signup.ts

export class SignUpPage {
  resposeData : any;
  userData = {"full_name":"", "password":"","email":"","name":""};
 

  constructor(public navCtrl: NavController, public authProvider:AuthProvider, 
    public alertCtrl: AlertController ,  public toastCtrl:ToastController
    ) {
  }

signup() {
    if(this.userData.full_name && this.userData.password && this.userData.email && this.userData.name){
      //Api connections
    this.authProvider.postData(this.userData, "signup").then((result) =>{
    this.resposeData = result;
    if(this.resposeData.userData){
      console.log(this.resposeData);
      localStorage.setItem('userData', JSON.stringify(this.resposeData) )
      this.navCtrl.push(HomePage);
    }
    else{
      this.presentToast("Please give valid username and password");
    }
    
    }, (err) => {
      console.log("error");
    });
  }
  else {
    console.log("Give valid information.");
  }
  
  }

  login() {
    this
      .navCtrl
      .push(SignInPage);
  }

  presentToast(msg) {
    let toast = this.toastCtrl.create({
      message: msg,
      duration: 2000
    });
    toast.present();
  }

and when ı make auth in ionic ı am getting this error.

access to XMLHttpRequest at ‘http://…8000/api/signup’ from origin ‘http://localhost’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

so please help me.

Posts: 1

Participants: 1

Read full topic

Ionic 4 pwa ios

$
0
0

@KasunGamage wrote:

swipe back enabled in ionic pwa app in ios device .how to disable it? even though i used as this in app.component.html => <ion-router-outlet main [swipeGesture]=“false”>

Posts: 1

Participants: 1

Read full topic

Firebase & Ionic

$
0
0

@redwards wrote:

Hello,

I am new to ionic and firebase.

At the moment, I have a web app in Firebase, it needs an android app.

Is it possible to port the code to ionic and convert the web app to a hybrid app, with it still using firebase services and hosting?

Any help would be much appreciated.

Kind Regards
Robin

Posts: 1

Participants: 1

Read full topic

Viewing all 70443 articles
Browse latest View live


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