Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48981 articles
Browse latest View live

Impossible to call any funciont inside function/promise

$
0
0

@JohnnyUB wrote:

Promises are so strange for me.

Look at this code

playAudio(index){

   storageRef.getDownloadURL().then(onResolve, onReject);

   function onResolve() {
     storageRef.getDownloadURL().then(function(url) {
       console.log(url);
       sMedia.playAudio(url);
     })
     console.log("File found!")
   }

   function onReject() {
     this.presentAlert();  /* <---- This is the problem */
     console.log("File don't exist.")
   }

presentAlert() {
   let alert = this.alertCtrl.create({
     title: 'Ops!',
     subTitle: "No file for this search",
     buttons: ['OK']
   });
   alert.present();
}

This code seems to work. If the file exist on Firebase then the function onResolve() works fine. Instead if the file don’t exist then the console log is displayed but the function is not execute.

This because the function presentAlert() is invisible inside function onReject(). Why? How can i solve this problem?

Thank you!

Posts: 1

Participants: 1

Read full topic


Skeleton Screen in Ionic3

$
0
0

@thehuangkai wrote:

Hi Everyone,

I want to create a full page loading screen for ionic3 app to improve the user experience.

Currently I am curious if there is a built-in function that can be called once everything on the page is loaded, including the images so that I can switch the loading screen to the loaded screen once everything finish loading.

Posts: 1

Participants: 1

Read full topic

Ionic 4: Livereload: [Error] ng has unexpectedly closed

$
0
0

@jentevh wrote:

$ionic cordova emulate ios -l -c --target=“iPhone-6s” – --buildflag="-UseModernBuildSystem=0"

> ng run app:ionic-cordova-serve --host=0.0.0.0 --port=8100 --platform=ios

[ERROR] ng has unexpectedly closed (exit code 0).

        The Ionic CLI will exit. Please check any output above for error details.

Running the exact command without -l works fine. This started happening after upgrading from beta13 to rc1.

Verbose output

  ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
  ionic:cli-framework:utils:process onBeforeExit handler: running 1 functions +1ms
  ionic:cli-framework:utils:process error while killing process tree for 8380: { Error: Command failed: taskkill /pid 8380 /T /F
  ionic:cli-framework:utils:process ERROR: The process "8380" not found.
  ionic:cli-framework:utils:process 
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:294:12)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:188:13)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:978:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 8380 /T /F' } +116ms
  ionic:cli-framework:utils:process onBeforeExit handler: error from function: { Error: Command failed: taskkill /pid 8380 /T /F
  ionic:cli-framework:utils:process ERROR: The process "8380" not found.
  ionic:cli-framework:utils:process 
  ionic:cli-framework:utils:process     at ChildProcess.exithandler (child_process.js:294:12)
  ionic:cli-framework:utils:process     at ChildProcess.emit (events.js:188:13)
  ionic:cli-framework:utils:process     at maybeClose (internal/child_process.js:978:16)
  ionic:cli-framework:utils:process     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
  ionic:cli-framework:utils:process   killed: false,
  ionic:cli-framework:utils:process   code: 128,
  ionic:cli-framework:utils:process   signal: null,
  ionic:cli-framework:utils:process   cmd: 'taskkill /pid 8380 /T /F' } +3ms
  ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +2ms

Any ideas?

Posts: 2

Participants: 1

Read full topic

How to load content such as images nicely onto ionic pages?

$
0
0

@thehuangkai wrote:

Hi everyone,

I am facing an issue with loading images onto my ionic page. In detail, my page has many images to be loaded and they are of different sizes. Because loading takes a while, some images appear before the others and this creates a very bad user experience.

For example the page should be like this:

Then in reality image3 loads first and for a while it becomes:


Then Image 1 loads:


Then finally image 2 loads

So I think there are 3 solutions but I don’t know how to do it in ionic:

  1. A full screen loading screen until everything loads finish
  2. A dedicated pre-loading screen for each image to load so their sequence do not get mixed up
  3. A skeleton screen like facebook’s that also waits till everything finish loading before disappearing.

However does anyone knows how to create a loading screen and only transition after all content are loaded? Not only the html loads but the images loads too.

Thank you hope this is clear.

Posts: 1

Participants: 1

Read full topic

AdMobFree - duplicated with element declared at AndroidManifest

$
0
0

@Formay wrote:

I’m trying to build an ionic3 app in android version…in ios build everything is well an work fine, but when I try “ionic cordova build android” this error is showed:

this is my manifest:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.splitlabs.eggTap" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-66125600censored/censored" />
        <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.android.gms.ads.AdActivity" android:theme="@android:style/Theme.Translucent" />
        <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-66125600censored~censored" />
    </application>
    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

this is my “ionic info”

s 3 days that I’m trying to solve this problem but I didn’t find a fix :confused: I think the problem is adMobFree plugin but I have no idea what change!

Thank you, and sorry for my bad english!

Posts: 1

Participants: 1

Read full topic

Issue with post a json

$
0
0

@asrert wrote:

[ sorry for bad english ] hi i want send a json to mysql but i get these error.

ERROR SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Response.Body.json (http.js:1091)
    at SafeSubscriber._next (apis.ts:21)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:242)
    at SafeSubscriber.next (Subscriber.js:189)
    at Subscriber._next (Subscriber.js:129)
    at Subscriber.next (Subscriber.js:93)
    at XMLHttpRequest.onLoad (http.js:1591)
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.js:4751)

my provider

import { Http,Response,Headers } from '@angular/http';
.
.
.
private urlsendnote:string="http://localhost/masterfinder_api/public/addnote";
.
.
.
  addNote(credentials) {
    return new Promise((resolve, reject) => {
      let headers = new Headers();
      this.http.post(this.urlsendnote, JSON.stringify(credentials), { headers: headers })
        .subscribe(res => {
          resolve(res.json());
        }), (err) => {
          reject(err);
        }
    });
  }

and this is my page.ts

import { ApisProvider } from '../../providers/apis/apis';
.
.
.
resposeData:any;
data={"t_id": "", "m_id": "", "note": ""};
this.data.note = 'testionic';
this.data.m_id = '1';
this.data.t_id ='1';
this.apis.addNote(this.data)

Posts: 1

Participants: 1

Read full topic

Help with components (newbie)

$
0
0

@stemmo wrote:

Hello,
I’m just starting with Ionic-3 and its structure.
I’m writing a simple app starting from tab template and I’ve added two simple components to understand them.
Refreshing the page in a browser I receive the following error:

Error: Unexpected module ‘ComponentsModule’ declared by the module ‘AppModule’. Please add a @Pipe/@Directive/@Component annotation.

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { QrCodePage } from '../pages/qrcode/qrcode';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { QRScanner } from '@ionic-native/qr-scanner';

import { ComponentsModule } from '../components/components.module';

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    QrCodePage,
    ComponentsModule
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    QrCodePage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    QRScanner,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}

The components.module.ts was auto generated by the ionic command and is:

import { NgModule } from '@angular/core';
import { JokeComponent } from './joke/joke';
import { JokeListComponent } from './joke-list/joke-list';
@NgModule({
	declarations: [JokeComponent,
    JokeListComponent],
	imports: [],
	exports: [JokeComponent,
    JokeListComponent]
})
export class ComponentsModule {}

Both the components are annotated by @Component.

Which is the problem?

Posts: 1

Participants: 1

Read full topic

Cordova-plugin-mobile-ocr

$
0
0

@gsandersmd wrote:

I have installed a plugin called cordova-plugin-mobile-ocr. When attempting to build for android it builds without issue. however, when trying to build for ios, it is throwing a build error:

=== BUILD TARGET GoogleToolboxForMac OF PROJECT Pods WITH CONFIGURATION Debug ===

Check dependencies

** BUILD FAILED **

The following build commands failed:

ProcessProductPackaging “” /Users/gregorysanders/Library/Developer/Xcode/DerivedData/hybridchart3-bgmbxulfhipiawanpfufxlhawkuq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GoogleMobileVision-GoogleMVTextDetectorResources.build/GoogleMVTextDetectorResources.bundle-Simulated.xcent

(1 failure)

CordovaError: Promise rejected with non-error: ‘Error code 65 for command: xcodebuild with args: -xcconfig,/Users/gregorysanders/ionictest/hybridchart3-ocr/platforms/ios/cordova/build-debug.xcconfig,-workspace,hybridchart3.xcworkspace,-scheme,hybridchart3,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/gregorysanders/ionictest/hybridchart3-ocr/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/gregorysanders/ionictest/hybridchart3-ocr/platforms/ios/build/sharedpch,-UseModernBuildSystem=0’

at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)

at <anonymous>

at process._tickCallback (internal/process/next_tick.js:189:7)

[ ERROR ] An error occurred while running subprocess cordova .

cordova build ios --buildFlag=-UseModernBuildSystem=0 exited with exit code 1.

I removed platform ios and re-added it.
I did a Pod Update from the platform/ios folder as well.
Still getting the error.

Any help would be appreciated. Thanks.

Posts: 1

Participants: 1

Read full topic


How to implement charts in ionic2?

Ionic app hangs when you inspect in chrome

$
0
0

@indraraj26 wrote:

Issue : https://github.com/ionic-team/cordova-plugin-ionic/issues/202

cordova plugin ls output:

cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-mauron85-background-geolocation 2.3.6 "CDVBackgroundGeolocation"
cordova-plugin-native-spinner 1.1.3 "Native Spinner"
cordova-plugin-nativegeocoder 3.1.3 "NativeGeocoder"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.5.2 "Cordova sqlite storage plugin"
cordova.plugins.diagnostic 4.0.10 "Diagnostic"
ionic info output:

>ionic info

Ionic:

   ionic (Ionic CLI)  : 4.4.0 (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.2
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 13 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\HP\AppData\Local\Android\Sdk)
   NodeJS            : v8.14.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

Describe the bug
I tested with dev and prod build but still my apps get hanged when you inspect in chrome.

To Reproduce
Steps to reproduce the behavior:
hangout sometime in app you will stuck or hang then myApp isnt responding

Expected behavior
it should not hanged

Chrome version :
Version 71.0.3578.98 (Official Build) (64-bit)
even tested with nightly build chrome
Version 73.0.3667.0 (Official Build) canary (64-bit)

even i have this in index.html

<script src="cordova.js"></script>

Posts: 1

Participants: 1

Read full topic

In ionic v4 defult value not set in ion-select

$
0
0

@Sushil2044 wrote:

I have try to default set the value in ion select which is not selected the value but in radio button select the value…
<ion-select [(ngModel)]=“shippingDetails.units” name=“units” value="{{weightUnits}}" ok-text=“Okay” cancel-text=“Dismiss”>
<ion-select-option *ngFor=“let p of data1?.units” value="{{p.name}}">{{p.name}}
notselect
select%20value

Posts: 1

Participants: 1

Read full topic

Epubjs compatibility with ionic 4?

$
0
0

@louis5017 wrote:

Hello, i tried to implement epubjs in a ionic 4 project but when i try to initialize a book, my web page blank, does anyone have a solution?

Posts: 1

Participants: 1

Read full topic

Post With Cors Policy is OK but Post w/ Attachment Cors Policy error is back

$
0
0

@boblingwide wrote:

Hi last time when using Post in .Net WebServe I have an error of Cors Policy and to solve it I add EnableCorsAttribute in WebApiConfig.cs and the error of Cors Policy is solve.

 var cors = new EnableCorsAttribute(origins: "*", headers: "*", methods: "*");
 config.EnableCors(cors);

Right now the problem is when Mm using post with “attachment” the Post with attachment has encountered and Cors Policy error again, but when using ordinary post to server cors is not a problem, how come with attachment the Cors Policy Error is back when my Global configuration is already set to allow Cors Policy?

Please help me.

Posts: 1

Participants: 1

Read full topic

Clicking radio button does not pop up ion-select

$
0
0

@fhks wrote:

Hi all,

I am trying to select options after clicking the branch radio button. Issues are:

  1. Clicking radio icon only marks the option selected but does not pop up the select options
  2. Clicking the label pops up the select options but does not markthe radio selected

How can I make the select option pop up, regardless of where I click and the radio is selected as well?

<ion-item>
                <ion-radio item-left value="me"></ion-radio>
                <ion-label>Me</ion-label>
</ion-item>
<ion-item>
                <ion-radio item-left value="branch"></ion-radio>
                <ion-label>Branches</ion-label>
                <ion-select [(ngModel)]="branches" multiple="true">
                    <ion-option>Branch 1</ion-option>
                    <ion-option>Branch 2</ion-option>
                    <ion-option>Branch 3</ion-option>
                </ion-select>
</ion-item>

Posts: 1

Participants: 1

Read full topic

Ionic build/run android error

$
0
0

@cikcoh wrote:

Hi, my project was working fine before, but suddenly have issue when building


> What went wrong:
Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
> Could not determine artifacts for com.facebook.android:facebook-common:4.39.0
> Could not get resource 'https://jcenter.bintray.com/com/facebook/android/facebook-common/4.39.0/facebook-common-4.39.0.aar'.
> Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-common/4.39.0/facebook-common-4.39.0.aar'.
> Connect to d29vzk4ow07wi7.cloudfront.net:443 [d29vzk4ow07wi7.cloudfront.net/99.84.87.181, d29vzk4ow07wi7.cloudfront.net/99.84.87.62, d29vzk4ow07wi7.cloudfront.net/99.84.87.218, d29vzk4ow07wi7.cloudfront.net/99.84.87.80] failed: Operation timed out (Connection timed out)

Can anyone help me to figure out why? i havent made any major changes or havent install new plugins.

Posts: 1

Participants: 1

Read full topic


How to set platform specific css in ionic4

$
0
0

@pantarmj wrote:

To set specific styles to “ListingPage” for android and ios in ionic 3, I was using below structure in .scss file of the “Listing” page/component:

.ios {  // for ios
    page-listing { // page selector
        // css enclosed in class or id selectors
    }
}

.md {  // for android
    page-listing { // page selector
        // css enclosed in class or id selectors
    }
}

How can I achieve the same platform specific styling in ionic4.

Posts: 1

Participants: 1

Read full topic

Animated Splash Screen in Ionic 4.0

$
0
0

@hvdm wrote:

Good day

I am new to the Ionic platform, and a trying to implement an animated splash screen. From my research it appears that it needs to be faked by showing a blank splash screen, then loading the animation once the app has started.

I found a wonderful tutorial on how to best do so in Ionic 3.0 here, but there are some differences between 3.0 and 4.0 making it difficult to implement this approach.

I have discussed it with a colleague of mine who is more experienced with the platform, and he suggests that we, similarly to the above mentioned tutorial, simply use a blank splash image, then play the animation first thing when the app loads, after which we show the “first page” so to speak.

Would this be suitable, or are we missing something important that might make the app appear slow?

Any advice would be greatly appreciated

Posts: 1

Participants: 1

Read full topic

Passing data from api to another page (PLEASE HELP!)

$
0
0

@andreasTedja wrote:

Dear Master,

i want to passing data API from page one to page two.
let say i have data from API like this:

categories:[
{
id: 001
main_id: 001
depth: 0
name: Man
},{
id:002
main_id: 002
depth: 0
name: women
{
id: 003
main_id:001
depth: 1
name: business_man
},{
id:004
main_id: 002
depth: 1
name: business_girl
}
]

and when i serve the ionic the output of **first page** will printed like this:

1. man  1
2. women  2

HTML code of **PageOne** like this:

<ion-item class=“tab2-selectCategory” *ngFor=“let takeData of category; let i=index” >

  <button (tap)=depth1()>{{i+1}} {{takeData.name}}  {{takeData.id}}</button> 
</ion-item>

and PageOne.ts File like this:

let filter = ;

        filter.push({
            field: 'depth',
            operator: '=',
            value: '0',
            mode: 'and'
        });

let param = {

api_token: '086090c7-2c12-4f00-9ac1-'',
select: 'id,depth,name',
filter: JSON.stringify(filter)

};

let apiUrl = ‘http://127.0.0.1/dev_inventory_1/public/api/v1/categories’;

this.httpClient.post(apiUrl, null, {params: param}).subscribe(
getData => {
this.kategori = getData[‘categories’];
loader.dismiss();
depth(){
this.navCtrl.push(PageTwo)
}

the question is how to send the id from page one to page two?
so, when i click 1.Man , the id (by tapped) passing to second page. in second page the sistem will print:
Business Man

and when click 2. Women (in page one) the page two will print:
Business Girl

thanks for your helping.
Regards
Andre

Posts: 1

Participants: 1

Read full topic

Ionic 3d model loader?

$
0
0

@liamchambers89 wrote:

Does anyone know how to load a model into Ionic.I want to load in a 3d animal that the user can rotate. I am able to generate a cube using canvas but I cant figure out how to load in a model. Thanks

Posts: 1

Participants: 1

Read full topic

Read from database

$
0
0

@Josef87 wrote:

I have some trouble when i want to get data from database. I cannot run the command: “ionic cordova run android --device”. There always an error occurs:

[13:46:35] ionic-app-script task: “build”
[13:46:35] Error: ./src/pages/data/data.ts Module not found: Error: Can’t resolve ‘@angular/core/src/util’ in
‘C:\Users\hartj\CC - Kopie\src\pages\data’ resolve ‘@angular/core/src/util’ in
‘C:\Users\hartj\CC - Kopie\src\pages\data’ Parsed request is a module using description file:
C:\Users\hartj\CC - Kopie\package.json (relative path: ./src/pages/data) Field ‘browser’ doesn’t
contain a valid alias configuration after using description file: C:\Users\hartj\CC -
Kopie\package.json (relative path: ./src/pages/data) resolve as module looking for modules in
C:\Users\hartj\CC - Kopie\node_modules using description file: C:\Users\hartj\CC -
Kopie\package.json (relative path: ./node_modules) Field ‘browser’ doesn’t contain a valid alias
configuration after using description file: C:\Users\hartj\CC - Kopie\package.json (relative path:
./node_modules) using description file: C:\Users\hartj\CC -
Kopie\node_modules@angular\core\package.json (relative path: ./src/util) no extension Field ‘browser’
doesn’t contain a valid alias configuration C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util is not a file .ts Field ‘browser’ doesn’t contain a valid alias
configuration C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.ts doesn’t exist .js
Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util.js doesn’t exist .json Field ‘browser’ doesn’t contain a valid
alias configuration C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.json doesn’t
exist as directory existing directory using path: C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index using description file: C:\Users\hartj\CC -
Kopie\node_modules@angular\core\package.json (relative path: ./src/util/index) no extension Field ‘browser’
doesn’t contain a valid alias configuration C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index doesn’t exist .ts Field ‘browser’ doesn’t contain a valid
alias configuration C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.ts doesn’t
exist .js Field ‘browser’ doesn’t contain a valid alias configuration C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index.js doesn’t exist .json Field ‘browser’ doesn’t contain a
valid alias configuration C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.json
doesn’t exist [C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.ts] [C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util.js] [C:\Users\hartj\CCr -
Kopie\node_modules@angular\core\src\util.json] [C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index] [C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index.ts] [C:\Users\hartj\CC -
Kopie\node_modules@angular\core\src\util\index.js] [C:\Users\hartj\CC-
Kopie\node_modules@angular\core\src\util\index.json] @ ./src/pages/data/data.ts 13:0-48 @
./src/pages/data/data.module.ts @ ./src lazy @ ./node_modules/ionic-angular/util/ng-module-loader.js @
./node_modules/ionic-angular/util/module-loader.js @
./node_modules/ionic-angular/components/popover/popover-component.js @ ./node_modules/ionic-angular/index.js
@ ./src/app/app.module.ts @ ./src/app/main.ts
Error: ./src/pages/data/data.ts
Module not found: Error: Can’t resolve ‘@angular/core/src/util’ in ‘C:\Users\hartj\CC - Kopie\src\pages\data’
resolve ‘@angular/core/src/util’ in ‘C:\Users\hartj\CC - Kopie\src\pages\data’
Parsed request is a module
using description file: C:\Users\hartj\CC - Kopie\package.json (relative path: ./src/pages/data)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: C:\Users\hartj\CC - Kopie\package.json (relative path: ./src/pages/data)
resolve as module
looking for modules in C:\Users\hartj\CC - Kopie\node_modules
using description file: C:\Users\hartj\CC - Kopie\package.json (relative path: ./node_modules)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: C:\Users\hartj\CC - Kopie\package.json (relative path: ./node_modules)
using description file: C:\Users\hartj\CC - Kopie\node_modules@angular\core\package.json (relative path: ./src/util)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util is not a file
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.json doesn’t exist
as directory
existing directory
using path: C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index
using description file: C:\Users\hartj\CC - Kopie\node_modules@angular\core\package.json (relative path: ./src/util/index)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.json doesn’t exist
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.ts]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.js]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util.json]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.ts]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.js]
[C:\Users\hartj\CC - Kopie\node_modules@angular\core\src\util\index.json]
@ ./src/pages/data/data.ts 13:0-48
@ ./src/pages/data/data.module.ts
@ ./src lazy
@ ./node_modules/ionic-angular/util/ng-module-loader.js
@ ./node_modules/ionic-angular/util/module-loader.js
@ ./node_modules/ionic-angular/components/popover/popover-component.js
@ ./node_modules/ionic-angular/index.js
@ ./src/app/app.module.ts
@ ./src/app/main.ts
at new BuildError (C:\Users\hartj\CC - Kopie\node_modules@ionic\app-scripts\dist\util\errors.js:16:28)
at callback (C:\Users\hartj\CC - Kopie\node_modules@ionic\app-scripts\dist\webpack.js:121:28)
at emitRecords.err (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\Compiler.js:269:13)
at Compiler.emitRecords (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\Compiler.js:375:38)
at emitAssets.err (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\Compiler.js:368:12)
at next (C:\Users\hartj\CC - Kopie\node_modules\tapable\lib\Tapable.js:218:11)
at Compiler.compiler.plugin (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (C:\Users\hartj\CC - Kopie\node_modules\tapable\lib\Tapable.js:222:13)
at Compiler.afterEmit (C:\Users\hartj\CC - Kopie\node_modules\webpack\lib\Compiler.js:365:9)
[ERROR] An error occurred while running subprocess ionic-app-scripts.

php:

<?php


$host = "192.168.xxx.xxx";
$user = "root";
$passwort = "pass";
$dbName = "connectedcar";


$db_connection = mysqli_connect($host,$user,$passwort,$dbName);

if ($db_connection) {

    $utfQuery = "SET NAMES 'utf8'";
    mysqli_query($db_connection, $utfQuery);

    $query = "SELECT wert FROM ultraschall WHERE id = 1";
    
    $result = mysqli_query($db_connection, $query);

    $ult1 = $result->fetch_all();

    echo json_encode($ult1);

    
    
}

else {
    die("Die Verbindung zur Datenbank ist fehlgeschlagen");
}
?>

and the provider:

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';



@Injectable()
export class GlobalProvider {

dif1:number;

constructor(public http: HttpClient){}

insertIn() {
    this.http.get("http://192.168.xxx.xxx/test/getUltra1.php").subscribe( data => {
        this.dif1 = JSON.parse(data["body"]);
    })
}

}

when i use the insertIn() function i get this error. if i don´t use it, it works.

Posts: 1

Participants: 1

Read full topic

Viewing all 48981 articles
Browse latest View live


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