Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230639 articles
Browse latest View live

Info.plist problem after build

$
0
0

ok VICTORY!..

so for some strange reason, i had to manually add an item under ‘url schemes’ (fb121212). it is part of the list file on the ios folder file, but not when it gets to xcode !?!

well hopefully thats the end of it!


Ionic Capacitor 404 eror - inappbrowser is not in the npm registry

$
0
0

I got an error 404 from trying to install the inappbrowser plugin

npm install @ionic-enterprise/inappbrowser

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@ionic-enterprise%2finappbrowser - Not found
npm ERR! 404
npm ERR! 404  '@ionic-enterprise/inappbrowser@latest' is not in the npm registry.
'''

I have also run npm config set registry https://registry.npmjs.org/ but still get the same error

[Ionic Tutorial] Beautiful Custom Tabs with Custom Icons

$
0
0

Thanks!! really cool.

I need to get it work now with just 3 tabs (being the second tab the one with the +). So far my attempts make it look quite weird.

Also it would be amazing if the colors are aligned with the primary, secondary, etc… colors.

Thanks!

Ionic 4 using firebase for login screen

How do you create Stencil / Ionic project without PWA (Do not have SSL)

$
0
0

Why not add ssl to your server? Costs nothing these days and probably easy to do, and pretty much all sites should have an ssl cerificate.

Ionic4: The hamburger icon of th sidemenu disappears refreshing the page

$
0
0

Please start a new thread.

Please provide some details about your problem so that someone can help you.

Ionic 4 Lazy Loading and Modals

$
0
0

After I have tried, the modal unable to independently lazy load. It has to tie with other modules to lazy load.

e.g. app-routing.module.ts

 const routes: Routes = [
   {
    path: 'MyPage', 
    loadChildren: () => import('../my/my.module').then( m => m.MyModule)
   }
 ];
 
 @NgModule({
   imports: [
     RouterModule.forRoot(
       routes,
       { preloadingStrategy: PreloadAllModules}
     )],
   exports: [RouterModule]
 })
 export class AppRoutingModule { }

e.g. MyModule.ts <- lazy module

@NgModule({
     declarations: [MyPage],
     imports: [
         RouterModule.forChild([{ path: '', component: MyPage }]),
         MeProfileModalPageModule <-- this modal has to lazy load with other module
     ],
     exports:[
         MyPage
     ]
   })
   export class MyModule { }

And the MeProfileModalPageModule have to remove all the route from Angular.

e.g. MeProfileModalPageModule <- unable lazy module

@NgModule({
    declarations: [MeProfileModalPage],
    imports: [
    ],
    exports: [
        MeProfileModalPage
    ]
  })
  export class MeProfileModalPageModule { }

Ionic 5 translate loader external link failed

$
0
0

import { Injectable } from ‘@angular/core’;
import { TranslateLoader } from ‘@ngx-translate/core’;
import { APIURL } from “…/enum”
import { Observable } from ‘rxjs’;
import {HttpClient, HttpErrorResponse, HttpHeaders,HttpParams} from ‘@angular/common/http’;

@Injectable()
export class CustomTranslateLoader implements TranslateLoader {
contentHeader = new Headers({“Content-Type”: “application/json”,“Access-Control-Allow-Origin”:"*"});

constructor(private http: HttpClient) {}
getTranslation(lang: string): Observable<any>{

            const options = {
   headers: new HttpHeaders({ 'Content-Type':'application/json; charset=utf-8',"Access-Control-Allow-Origin":"*"}),
    params: new HttpParams(),
    reportProgress: false,

};

    var apiAddress = APIURL.LIVE+"static/i18n/"+ lang+".json";
    return Observable.create(observer => {
      this.http.get(apiAddress,options).subscribe((res: Response) => {
                observer.next(res.json());
                observer.complete();               
            },
        error => {
            //  failed to retrieve from api, switch to local
            this.http.get("/assets/i18n/en.json").subscribe((res: Response) => {
                observer.next(res.json());
                observer.complete();               
            })
        }
        );
    }); 
}

}

I am using above code…but external link getting failed to fetch data.if i open link with browser working fine please help me.


List scroll hang at end in ios only

$
0
0

Hello Sir,

I have developed a app in scroll bar freeze at the end of list in ios but work fine in android please help us to resolve this issue

Slowness in app after multiple no of records in list

$
0
0

Hello Sir ,

I have facing an issue in my app after more than 100 records in list view app starting slow and list and its details page please let me know why this issue come

Ionic 5 getting blocked-CORS error when trying to fetch from Firebase

$
0
0

In showcase.service.ts, I have the following function that fetch the data from Firebase

    fetchShowcases() {
        return this.http.get<{[key: string]: ShowcaseData}>('https://testing-br204.firebaseio.com/')
            .pipe(map(resultData => {
                const stitches = [];
                for (const key in resultData) {
                    if(resultData.hasOwnProperty(key)) {
                        stitches.push(new Stitch(
                            key,
                            resultData[key].title,
                            resultData[key].description,
                            resultData[key].imageUrl,
                            resultData[key].price,
                        )
                        );
                    }
                }
                return stitches;
            }))
    }

And in page.ts the said function is being called on ngOnInit()

  ngOnInit() {
    this.stitchesSub = this.showcaseService.fetchShowcases().subscribe(stitches => {
      this.showcases = stitches;
    })
  }

When tested both in localhost and after deployed the ionic app to firebase, it kept giving the following error:
Access to XMLHttpRequest at 'https://console.firebase.google.com/project/testing-br204/database/data/' (redirected from 'https://testing-br204.firebaseio.com/') from origin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Where can I configure to allow CORS policy in Ionic?

In ionic how to take input from keyboard like this below image in ionic 5

$
0
0

Screen Shot 2020-05-30 at 12.31.16 PM

0

i want to take input from keyboard like this currency will be fix and when i type any number and point value so amount should be show like this below image. i tried this with super script tag but unfortunately tag doesn’t support input. can anyone help if they know about this

Ion-buttons with badges for IONIC 4

$
0
0

These didn’t work for me with Ionic 5. My solution:

.badge-one {
  position: absolute;
  top: 0px;
  right: -5px;
  font-size: 0.6em;
  --padding-start: 5px;
  --padding-end: 5px;
}

.badge-two {
  position: absolute;
  top: 0px;
  right: -5px;
  font-size: 0.6em;
  --padding-start: 3px;
  --padding-end: 3px;
}
      <ion-button class="badge-button" routerLink="/notifications/" routerDirection="forward">
        <ion-icon size="large" name="notifications-circle-outline">
        </ion-icon>
        <ion-badge [class.badge-one]="unread < 10" [class.badge-two]="unread >= 10" color="danger">{{ unread }}</ion-badge>
      </ion-button>

Screen Shot 2020-05-30 at 12.36.23

Screen Shot 2020-05-30 at 12.36.02

P.S. I call different classes for one digit and more digits. It’s optional.

Ionic/angular Android Http not working

$
0
0

hi I am getting a similar error .I am using ionic 5 . Everything works fine on the browser . The app connects to nodejs back-end server . The HTTP calls work fine in the browser but nothing is returned in android . I did not really understand what worked for you . @mhartington @ThonyFD12

I have implemented CORS in the back-end server to set headers.

Any help would be much appreciated . TIA

Splash Screen is stretched in some devices

$
0
0

Hi this worked well,
but somehow for 1 second the splashscreen is streched for 1 second and then it crops the image to the right aspect ratio. Anyone facing the same issue?

Edit:
This solved my problem


Ionic 5 getting blocked-CORS error when trying to fetch from Firebase

In ionic how to take input from keyboard like this below image in ionic 5

$
0
0

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

How to remove history from stack in Ionic 4

$
0
0

Did you find any solution, source code please?

How to remove history from stack in Ionic 4

$
0
0

Can you provide code example please

Open existing DB

$
0
0

from the plugin docs on ionic

  1. Add plugin to your project
ionic cordova plugin add cordova-sqlite-storage
npm install @ionic-native/sqlite
  1. In the file you want to use the DB plugin maybe a dataservice.ts that provides data to the app file for example
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';

constructor(private sqlite: SQLite) { }

...


// How to create a db or open
// create(config) Opens or creates a SQLite database file.
this.sqlite.create({
  name: 'data.db',
  location: 'default'
})
  .then((db: SQLiteObject) => {


    db.executeSql('create table danceMoves(name VARCHAR(32))', [])
      .then(() => console.log('Executed SQL'))
      .catch(e => console.log(e));


  })
  .catch(e => console.log(e));

// Add CRUD functions and other functionalities you may need

addData(){
// Implementation
...
}

readData(){
// Implementation
...
}

updateData(){
// Implementation
...
}

deleteData(){
// Implementation
...
}
...

Read through this tute (though it says ionic3) and you’ll have a general roadmap as to what you can do…
Ionic 3, Angular 4 and SQLite CRUD Offline Mobile App

Viewing all 230639 articles
Browse latest View live


Latest Images

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