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

Problem while getting Promise return

$
0
0

@Fabricio10 wrote:

I’m in a firebase ionic project, and I’m facing some problems. I’m newbie in mobile development, so my problem is when getting a return of a update command in firebase. In my provider I have:

private clientCollection: AngularFirestoreCollection<Client>;
constructor(
    public db: AngularFirestore
  ) {
    this.clientCollection = db.collection<Client>('clients');
    this.historicoCollection = db.collection<Historico>('historico');
  }

And my function after, receive a Client Object and a key of firebase register:

updateUser(user: any, key: string){
    return this.clientCollection.doc<Client>(key).update(user)
  }

My scan function, calls updateUser in provider:

saveUser(data: Client){
      this.meuLoader.dismiss();
    
      this.db.getUserPassword(data.password).subscribe((res) => {
        if(res.length){
          data.key = res[0].key;
          //this.goToResult(data);
        }
      });         

        this.db.updateUser(data, data.key).then((res) => {
          this.goToResult(data);
        }).catch((error) => {
            this.alertCtrl.create({
              title: 'retorno',
              subTitle: 'Erro no retorno da promisse',
              buttons: ['Dismiss']
            }).present();
        })      
  }

The saveUser function calls two functions in provider. Is there a problem making this way? When I run on my device, nothing works. The node does not update…

Thanks

Posts: 3

Participants: 2

Read full topic


Popover draggable and resizable with an Ionic4 PWA

$
0
0

@ioclaudio wrote:

Hi,
my app has a PWA version in which I use popovers to show some pages.
According to you is it possible to make these popover draggable and/or resizable?

Could I succeed in achieving this by working only with CSS?
Have you ever seen or done something similar?

Thank you very much

cld

Posts: 1

Participants: 1

Read full topic

Chema validation failed ".builders['app-shell']" should have required property 'class'

$
0
0

@lautarolorenz wrote:

on “ionic serve”

Schema validation failed with the following errors:
Data path “.builders[‘app-shell’]” should have required property ‘class’.
[ERROR] ng has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.

Ionic:

ionic (Ionic CLI) : 4.12.0 (C:\Users\coco\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.800.0
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview
2.2.3, (and 7 other plugins)

System:

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

angular.json

{
  "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
  "version": 1,
  "defaultProject": "app",
  "newProjectRoot": "projects",
  "projects": {
    "app": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "app",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "progress": false,
            "outputPath": "www",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.app.json",
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
              {
                "glob": "**/*.svg",
                "input": "node_modules/ionicons/dist/ionicons/svg",
                "output": "./svg"
              }
            ],
            "styles": [
              {
                "input": "src/theme/variables.scss"
              },
              {
                "input": "src/global.scss"
              }
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "app:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.spec.json",
            "karmaConfig": "src/karma.conf.js",
            "styles": [],
            "scripts": [],
            "assets": [
              {
                "glob": "favicon.ico",
                "input": "src/",
                "output": "/"
              },
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "/assets"
              }
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "src/tsconfig.app.json",
              "src/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        },
        "ionic-cordova-build": {
          "builder": "@ionic/angular-toolkit:cordova-build",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "ionic-cordova-serve": {
          "builder": "@ionic/angular-toolkit:cordova-serve",
          "options": {
            "cordovaBuildTarget": "app:ionic-cordova-build",
            "devServerTarget": "app:serve"
          },
          "configurations": {
            "production": {
              "cordovaBuildTarget": "app:ionic-cordova-build:production",
              "devServerTarget": "app:serve:production"
            }
          }
        }
      }
    },
    "app-e2e": {
      "root": "e2e/",
      "projectType": "application",
      "architect": {
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "app:serve"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": "e2e/tsconfig.e2e.json",
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }
  },
  "cli": {
    "defaultCollection": "@ionic/angular-toolkit"
  },
  "schematics": {
    "@ionic/angular-toolkit:component": {
      "styleext": "scss"
    },
    "@ionic/angular-toolkit:page": {
      "styleext": "scss"
    }
  }
}

Posts: 2

Participants: 1

Read full topic

[ERROR] Network connectivity error occurred, are you offline?

Compilation ipa credentials problem : IOS

$
0
0

@ericcoquelin wrote:

Hi All,
I have an app.
It’s app id (in the config.xml) is weel configured in the console of apple developers.

I’ve created all required files on ubuntu (.cer file, provisioning and i also have the p12 file)
I’ve got all the required files.

But When Uploading my app (under package->certificates) in the Pro platform, i get the following error:

“There was an error while submitting your credentials. Certificate, Provisioning Profile, or Cerftificate password invalid.”

I am sure the password is correct.
I’ve followed each step given in this link :

https://www.ucodice.com/blog/how-to-create-ipa-for-ios-device-without-macbook-or-xcode/

What am i missing? (I also made sure the bundle id on my app account matched the one on the config.xml file)

Please help ?
Thanks.

Posts: 1

Participants: 1

Read full topic

Ionic CLI 5

Live Broadcasting App using Ionic

$
0
0

@livefromproductions wrote:

I am working on a live broadcasting application using ionic/cordova. Is there a plug-in that allows pushing the captured video to a third party for consumption/encoding/delivery?

Posts: 1

Participants: 1

Read full topic

Deploy Ionic 4 App in IIS

$
0
0

@magar-dev wrote:

Hello, guys.

I Publish an app in IIS Windows 10, from the IIS the application works, but if I run it from the internet browser, the following error is displayed:

HTTP Error 404.0 - Not Found.

Posts: 3

Participants: 2

Read full topic


CANNOT FIND MODULE './image-viewer.directive

$
0
0

@adsegzy wrote:

I am working on an app and when i tried running ionic serve but it’s showing me a RUNTIME ERROR CANNOT FIND MODULE './image-viewer.directoveerror

I have tried installing image viewer severally but it’s not working. Please what do I do?
Thanks

Posts: 1

Participants: 1

Read full topic

Plugin network + loadingcontroller not work in ionic4

$
0
0

@codeg11 wrote:

i have a project in ionic4, i am trying this codeg, but when execute in a real device not hidde loading when connect the internet in the phone, just show when not have internet

  constructor(
  

  private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private router:Router,
    private menu:MenuController,
    private logeo:LoginService,
    private nvctr:NavController,
    private activated_rout:ActivatedRoute,
    private network:Network,
    private loading_c:LoadingController 
  ) {
    this.network_check()
    this.initializeApp();
  }
  
    
 
    
  network_check() {

          
        // watch network for a disconnection
        let disconnectSubscription = this.network.onDisconnect().subscribe(() => {
          this.loading_present('mostrar')
        });

        // stop disconnect watch
        disconnectSubscription.unsubscribe();


        // watch network for a connection
        let connectSubscription = this.network.onConnect().subscribe(() => {
         this.loading_present('esconder')
          // 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.

        });

        // stop connect watch
        connectSubscription.unsubscribe();
      
     
        

}
    
async loading_present(condicion:String) {
    const loading = await this.loading_c.create({
      message: 'Esperando conectividad'

    })
    if(condicion == 'mostrar'){
        
        loading.present()
        
    }
    
    else{
        
        loading.dismiss()
    }
  }

Posts: 1

Participants: 1

Read full topic

How To Navigate To Tabbed Page With Parameters

$
0
0

@Shmoji wrote:

I have recently learned Angular routing and navigation in Ionic 4. I learned how you can use /:id to pass params and go to different pages based on param.

I also learned how to create a tabbed app.

However, I cannot seem to get an app with both of these to work. The routing is crazy and I cannot figure it out. Does anyone know of any examples that do this?

Posts: 1

Participants: 1

Read full topic

Plz help me, i dont kwnow what does this error mean

IONIC 4 modal not working

Ionic twitter connect

$
0
0

@m7ammad7assan wrote:

Hi

I have Installed this plug in bu unfortunatelly it is not working,
I have double checked the twitter APIs and Fabric Key with no avail, please any advice is appreciatable …

it is going to twitter app then return to my app with the following
Error msg is “Failed login session”

Thanx …

Posts: 1

Participants: 1

Read full topic

Draggable ion-fab

$
0
0

@premktr wrote:

Can some plz tell me how to make draggable ion-fab. please give one example with so I can understand better.thanks.

Posts: 1

Participants: 1

Read full topic


Alternate Flash Icon between black/white on CameraPreview based on background color

$
0
0

@MeterMoDev wrote:

Sorry if this is a silly question, I am quite new to Ionic Cordova and I haven’t been able to figure this one out yet.

We use this plugin for an app with a camera: https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview

We also have a Flash On/Off icon (2 images that alternate), but it’s white, so when the background is bright, it would be useful to change the icon to black (obviously by inserting a different image).

Thus, I assume I need to get the actual background brightness somehow whilst using the camera.

Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic

How to put a icon inside side menu menu content right side

$
0
0

@flycoders_sourav wrote:

I have a side menu list i want to put a notification counter right side of the notification content
how can i do this please help me anyone

I want to do like this
imgpsh_fullsize_anim
any help would be appreciated
Thanks in advance

Posts: 1

Participants: 1

Read full topic

Ion-segment alignment problem

$
0
0

@albincs wrote:

< ion-toolbar>
< ion-segment class=“bgtool” no-border-top>
<ion-segment-button (click)=“loadFet(nt)” [class.segment-button-checked]=“allTab”>
All
< /ion-segment-button>
<ion-segment-button (click)=“loadFet(pt)” [class.segment-button-checked]=“newTab”>
New
< /ion-segment-button>
<ion-segment-button (click)=“loadFet(ct)”>
Acknowledged
< /ion-segment-button>
<ion-segment-button (click)=“loadFet(wt)” [class.segment-button-checked]=“arriveTab”>
Arrived
< /ion-segment-button>
<ion-segment-button (click)=“loadFet(kt)” [class.segment-button-checked]=“compTab”>
Completed
< /ion-segment-button>
< /ion-segment>
< /ion-toolbar>

Posts: 1

Participants: 1

Read full topic

[Ionic 4 + Vue.js] ion-tabs issue with routing components

$
0
0

@mezerotm wrote:

I’m using @ionic/vue and trying to work with ion-tabs . I am having several issues with nested routes. where it will stack components on top of other components when I’m in a nested route and use the tabs to get out. (this is not an issue when using the back button)

Video Example (external link to vimeo)

Posts: 1

Participants: 1

Read full topic

Getting all files in phone

$
0
0

@abdosaeed wrote:

i want to work recursively in all directories and getting all files, i write some code but not work for me, i need help

getFiles(dir){
this.file.listDir(dir,’’).then((files)=>{
files.forEach(f1 => {
if(f1.isDirectory == true && f1.name !=’.’ && f1.name !=’…’){
this.getFiles(f1.fullPath.substring(1));
}else{
this.items.push({
name:f1.nativeURL,
});
}
});
});
}

Posts: 1

Participants: 1

Read full topic

Viewing all 70443 articles
Browse latest View live