2017-04-22 2 views
0

Ionic werfen Uncaught SyntaxError: missing) after argument list auf dem emulator, aber es funktioniert mit serve Befehl fein:Ionic Uncaught Syntaxerror: fehlt) nach Argumentliste auf Emulator

Fetch(what, callbackf) { 
    return this.woo.getAsync(what).then((result)=> { 
     this.zone.run(() => { 
      callbackf(JSON.parse(result.body)); 
     }); 
    }); 
} 

enter image description here

die ganze Anbieter:

import { Injectable, NgZone } from '@angular/core'; 
import { Http } from '@angular/http'; 
import 'rxjs/add/operator/map'; 

import WooCommerceAPI from 'woocommerce-api'; 


@Injectable() 
export class WooCommerce { 

    woo: any = null; 

    constructor(public http: Http, private zone: NgZone) { 
     this.woo = WooCommerceAPI(); 
    } 

    Fetch(what, callbackf) { 
     return this.woo.getAsync(what).then((result)=> { 
      this.zone.run(() => { 
       callbackf(JSON.parse(result.body)); 
      }); 
     }); 
    } 

} 

Ich bin nicht sicher, warum es nagt darüber, wenn alles in Ordnung zu sein scheint, und es läuft ohne Fehler/Problem im Browser, fehlt hier etwas?

hier ist die Inoinc info für den Fall, dass es etwas wie verwandt ist!

Your system information: 

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.0.1 
Ionic CLI Version: 2.2.3 
Ionic App Lib Version: 2.2.1 
Ionic App Scripts Version: 1.3.0 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Windows 7 
Node Version: v6.10.2 
Xcode version: Not installed 
+0

hat Ihr Callbackf Parameter –

+0

@Nidhinkumar nein! 'this.woo.Fetch ('Produkte/Kategorien', (Res) => { // Verwendung res ... });' – Abanoub

Antwort

0

Auf welche Art von Emulator versuchen Sie Ihre Anwendung zu implementieren? Ich hatte das gleiche Problem auf Android 6.0 (API 23), aber alles funktionierte gut auf Android 7.1.1 (API 25)

Verwandte Themen