ionic4

Adding multiple markers in ionic google map

筅森魡賤 提交于 2019-12-02 12:13:22
问题 I am trying to integrate google map in ionic project and got succeeded in displaying the google map on ionic page. But i want to display multiple markers on the this google map. tried different code but not getting this multiple markers thing. below is my code: html: <ion-content> <div #mapElement class="map" > </div> .ts file: import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core'; declare var google; @Component({ selector: 'app-home', templateUrl: 'home.page

Hosting a PWA in ionic with mysql database

故事扮演 提交于 2019-12-02 12:06:32
I have a mobile application in ionic and have uploaded it in playstore. Now I want to host it in a website. How do i do that with ionic 4 and mysql? I have tried visiting the ionic documentation about PWA but they are using firebase. ng add @angular/pwa ionic build --prod --service-worker ionic build --prod if you not need Cordova use: npm run ionic:build --prod and copy all from the www folder to your Web Server or if you need Cordova then Use Browser Platform for websites. ionic cordova platform add browser ionic cordova build browser --prod --release and copy all from the /platforms/browser

Ionic/Angular - Multiple routes not working

邮差的信 提交于 2019-12-02 11:40:48
I have an Ionic project setup using the tabs template. Here is my issue: I have an Activity tab that will have 3 buttons on the page: Friends Near Me Global When the page first load it will show a list of post for friends, when I click on the Near Me buttons it should replace the friends post with near me posts. this works great. When I click back on Friends, it does not change the content on the page. The URL changes, but the content does not. tabs.router.module.ts: const routes: Routes = [ { path: 'tabs', component: TabsPage, children: [ { path: 'activity', outlet: 'activity', component:

I cant retrieve data from server when I use android studio virtual emulator

不想你离开。 提交于 2019-12-02 09:31:15
I have an app, that works fine on browser, but i run it on the emulator it cant retrieve data from the server I got this error : polyfills.js:5601 OPTIONS http://localhost:3005/api/posts/toto net::ERR_CONNECTION_REFUSED scheduleTask @ polyfills.js:5601 push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ polyfills.js:2768 onScheduleTask @ polyfills.js:2659 capacitor-runtime.js:81 ERROR TypeError: You provided 'function (error) { // TODO: send the error to remote logging infrastructure console.error(error); // log to console instead // TODO: better job of transforming error for

How to fix “build.gradle” problem in a Cordova project?

柔情痞子 提交于 2019-12-02 05:55:14
问题 $ cordova build android --debug Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=E:\andoidSDK (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app > Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Project evaluation failed

Adding multiple markers in ionic google map

允我心安 提交于 2019-12-02 03:13:05
I am trying to integrate google map in ionic project and got succeeded in displaying the google map on ionic page. But i want to display multiple markers on the this google map. tried different code but not getting this multiple markers thing. below is my code: html: <ion-content> <div #mapElement class="map" > </div> .ts file: import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core'; declare var google; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage implements OnInit, AfterViewInit{

Angular Error : StaticInjectorError (Platform: core)[e -> t]:

落花浮王杯 提交于 2019-12-02 02:21:23
问题 As I am build the APK with --prod I am getting the error below ERROR Error: StaticInjectorError[e -> t]: StaticInjectorError(Platform: core)[e -> t]: NullInjectorError: No provider for t! at e.get (core.js.pre-build-optimizer.js:8894) at core.js.pre-build-optimizer.js:9139 at e (core.js.pre-build-optimizer.js:9083) at e.get (core.js.pre-build-optimizer.js:8980) at core.js.pre-build-optimizer.js:9139 at e (core.js.pre-build-optimizer.js:9083) at e.get (core.js.pre-build-optimizer.js:8980) at

Not able to convert the base64 to image path in Ionic 4

好久不见. 提交于 2019-12-02 00:10:24
I am working on my Ionic 4 app and I have used the camera plugin for image uploading and I have converted the image to the base64 for showing the image but the problem is that I am not able to convert the base64 to proper image path for sending it to the API. This is my editimage.page.html : <ion-item class="newitem2"> <ion-avatar class="image-center"> <img name="profile_pic" [src]="this.userdetailsedit.value.profile_pic"/> <ion-icon (click)="presentActionSheet()" class="myicon11" name="create"></ion-icon> </ion-avatar> </ion-item> This is my editprofile.page.ts : async UpdateUserDetails(){

How to fix “build.gradle” problem in a Cordova project?

不打扰是莪最后的温柔 提交于 2019-12-01 23:35:26
$ cordova build android --debug Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=E:\andoidSDK (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app > Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

Ionic 3 geolocation not working when GPS is disabled

送分小仙女□ 提交于 2019-12-01 21:06:06
I have ionic native geolocation plugin installed "@ionic-native/geolocation": "^4.15.0" I have also tried "4.6.0" and "4.20.0". It is working absolutely fine when I keep my GPS enabled before going to that page. But when GPS is not enabled, It won't ask me to turn it ON, gives an error on console and carry undefined coordinates with it. I wrote the method of getCurrentPosition in constructor/ionViewDidLoad. So even user enable it on that page, the method does not invoke and the coordinates remain undefined. Following is code this.geolocation .getCurrentPosition() .then(resp => { console.log