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

The menu is loaded twice on login plz your help

$
0
0

@eergreyes wrote:

Hello friends I would appreciate your help, I’ve been trying to solve this problem for a week.

Error:
the error is when in app.component.ts valid if the user is logged in redirected to Menupage that shows a tab menu combined with sidebar, when the redirection is done the menu page loads twice and this makes the menu disappear.

Ionic:

ionic (Ionic CLI) : 4.7.1 (/home/ereyes/.nvm/versions/node/v8.12.0/lib/node_modules/ionic)

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : not available
Cordova Plugins : not available

System:

NodeJS : v8.12.0 (/home/ereyes/.nvm/versions/node/v8.12.0/bin/node)
npm : 6.4.1
OS : Linux 4.15

app.component.ts:
export class MyApp {
rootPage:any = ‘LoginPage’;
private app;
private platform;
pages;
authState: any = null;

@ViewChild(Nav) nav: Nav;
constructor(private zone: NgZone,app: App, platform: Platform,private statusBar: StatusBar, splashScreen: SplashScreen,private auth: AuthService) {
this.app = app;
this.platform = platform;
this.initializeApp();
}

initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
});
this.auth.afAuth.authState.subscribe( user => {
console.log('user----------- '+user);
if ( user ){
this.rootPage = ‘MenuPage’;
//console.log('user '+ JSON.stringify(user));
}else{
this.rootPage = ‘LoginPage’;
//console.log('not logged: '+ JSON.stringify(user));
}
});
}
}

menu.ts:
export class MenuPage {

rootPage = ‘TabsPage’;

@ViewChild(Nav) nav: Nav;

pages: PageInterface = [
{title: ‘Perfil’, pageName: ‘ProfilePage’, index: 1, icon: ‘person’ },
{title: ‘Mis Direcciones’, pageName: ‘ProfilePage’, index: 1, icon: ‘md-map’ },
{title: ‘Historico de Pedidos’, pageName: ‘ProfilePage’, index: 1, icon: ‘ios-list-box-outline’ },
]

constructor(public navCtrl: NavController, public navParams: NavParams,private auth: AuthService) {

}

openPage(page: PageInterface) {
let params ={};
this.nav.setRoot(page.pageName, params, { animate: true, duration: 600, direction: ‘backward’ });
}

logout() {
this.auth.signOut();
this.nav.setRoot(‘LoginPage’);
}
}

best regards

Posts: 1

Participants: 1

Read full topic


App is not launching in emulator

Run apk file without internet connection ine the first page load

An error occurred while running subprocess ng

$
0
0

@Ludolefrenchy wrote:

when I do ionic cordova run android I receive the error

[ERROR] An error occurred while running subprocess ng.

        ng run app:ionic-cordova-build --platform=android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
Error: Command failed: taskkill /pid 8724 /T /F
Erreur�: le processus "8724" est introuvable.

someone would have an idea please

thank you in advance

ludo

Posts: 1

Participants: 1

Read full topic

Ion toggle issue

Ionic 4.0.0 Beta 3 -- Ion-icons not appearing

$
0
0

@mlynch wrote:

As the title says, I’m running Ionic v4.0.0 Beta 3, and I’m having an issue with <ion-icon> elements not appearing properly.

When I compile the application and run it on my Android tablet (Android 8.0.0), I see that the element does exist in the HTML, and there is space in the UI where the element should appear, but the icon itself simply doesn’t appear. If I set the <ion-icon> element’s background color, that appears just fine, but still no icon.

Posts: 1

Participants: 1

Read full topic

Modal component is not assignable to parameter of type 'ModalOptions'

$
0
0

@maxg86 wrote:

Hello , I’m trying to display a modal in a ionic 4 / angular app but the ModalController create function wont take components as first parameter, I’m passing the reference of a component class like in all examples I found but I get the following error in the console :
[ng] ERROR in src/app/pages/factures/factures.page.ts(90,55): error TS2345: Argument of type ‘typeof FacturePaiementComponent’ is not assignable to parameter of type ‘ModalOptions’.
[ng] Property ‘component’ is missing in type ‘typeof FacturePaiementComponent’.

The v3.9.2 API docs doesn’t seem compatible with v4 modal so I’m struggling.

Which reference should I pass ? and btw when I pass a second parameter as data to ModalController.create() it doesn’t accept it, how can I pass data to modal in v4?

code :
Here is the function where I call my modal in a page component :

import {Component, OnInit} from '@angular/core'
import { ModalController, NavParams } from '@ionic/angular';
import {DataService} from '../../services/data.service'
import * as moment from 'moment'
import {Facture} from '../../models/facture'
import {FacturePaiementComponent} from './facture-paiement/facture-paiement.component'

@Component({
  selector: 'app-factures',
  templateUrl: './factures.page.html',
  styleUrls: ['./factures.page.scss'],
})
export class FacturesPage implements OnInit {

  public detailsToggle = false
  public paiementToggle = false


  constructor(public service: DataService, public modalCtrl: ModalController) {
  }

ngOnInit() {
    ...
  }

  togglePaiement(facture: Facture) {
    this.presentPaiementModal(facture)
  }

  async presentPaiementModal(facture: Facture) {
    const paiementModal = await this.modalCtrl.create(FacturePaiementComponent);
    return await paiementModal.present();
  }
}

Here is the modal component :

import {Component, Input, OnInit} from '@angular/core'
import {NavParams} from '@ionic/angular'
import {Facture} from '../../../models/facture'

@Component({
  selector: 'facture-paiement',
  templateUrl: './facture-paiement.component.html',
  styleUrls: ['./facture-paiement.component.scss']
})
export class FacturePaiementComponent implements OnInit {

  constructor(public params: NavParams) {
    console.log('facture', params.get('facture'));
  }

  ngOnInit() {
  }
}

Thanks in advance,
Max

Posts: 2

Participants: 2

Read full topic

Help Setting up Environment for Old Project (2.0.0-beta.11)

$
0
0

@evandillon wrote:

Like the title says, I have a project build on “ionic-angular”: “2.0.0-beta.11”. I imagine I have to install Ionic cli locally but am having a hard time finding the appropriate version of that package. Either the install fails completely or I get a bunch of incompatibility warnings.

Upgrading is not an option at this point.

Can anyone guide me in the way a project like this should be set up?

Many thx,

Posts: 1

Participants: 1

Read full topic


How to Implement GeoFire in Ionic 4

$
0
0

@Motero69 wrote:

Hello
Any ideas on how to implement Geofire on Ionic?
I followed this link: https://github.com/firebase/geofire-js#documentation,

I install: npm install geofire firebase - save as the guide says, but I do not know if I have to import and declare in the app.module and how? Or if I also have to import and declare on the page that I’m going to use it?
Any ideas.

Thanks for help in advance

Posts: 1

Participants: 1

Read full topic

How to print QRcode with thermal printer.?

Android CORS issue when using fetch

$
0
0

@NorthFred wrote:

I just started a new project, in which I am reusing a component I used earlier in another Ionic v3 project. No modifications were done to the code.

The “fetch” simply gets a json from a server (not mine, operator ftp server), and my previous project can fetch that json without problem. Now the same code, used in a new project, is throwing a CORS error whenever I deploy my test app to Android.

Any clues as to what might be going wrong?

The only plugin I saw, which might have an effect on the fetch, is cordova-plugin-ionic-webview 3.1.1

Part of the code:

await fetch(CHANNELSURL, {
      method: 'GET',
      headers: {
        'Accept': 'application/json, text/plain',
        'Content-Type': 'application/json, text/plain',
        'Cache-Control': 'no-cache',
        'Save-Data': 'off',
        'Connection': 'close'
      }
    })
    .then(response => {
      return response.json();
    })

Posts: 1

Participants: 1

Read full topic

Missing HTML in imported Creator project

$
0
0

@mrchrisf wrote:

I imported a Creator project via zip file. I found a back button that I want to eliminate. However, I can’t find the HTML. It shows up in the developer tools, but I can’t find the files in source.

How do I make changes to ionic HTML that is imported from the Creator?

Posts: 1

Participants: 1

Read full topic

has anyone ran into an issue where adding cordova-plugin-geolocation into their project breaks building the development build via the ionic pro dashboard

fingerprint-aio style

Please help ionic4 issue with ios simulator

$
0
0

@abbashere wrote:

Facing issue last 2 days not any solution tried many things

node v10.15.0
ionic version 4.8.0
Cordova Platforms : android 7.1.4, ios 4.5.5
macOS Mojave

issue with sidebar ionic project with below run

ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"

simulator able to open without app and then got below error

No target specified for emulator. Deploying to iPhone-X, 12.1 simulator

io.ionic.starter: 40545

Error: ENOENT: no such file or directory, stat '/Users/myusername/Library/Logs/CoreSimulator/64FD3BE7-2F30-4DFE-8509-C9431C6B6C78/system.log'

[ **ERROR** ] **An error occurred while running subprocess** **cordova** **.**

Posts: 1

Participants: 1

Read full topic


Enable a ion-button after some time

$
0
0

@blondie63 wrote:

On my page i’ve a button and i want that it’s disabled by default, but, after 30 seconds my page is open, this button become enabled

Someone can help me ? :slight_smile:

Posts: 1

Participants: 1

Read full topic

Ionic 4 (and Ionic CLI 4.9) released! 🎉

$
0
0

@Sujan12 wrote:

Oh, see what my Ionic release bot just tweeted:

https://github.com/ionic-team/ionic/releases/tag/v4.0.0 says:

4.0.0 Neutronium
Enjoy! :balloon:

And here is the official tweet:

And blog post:

https://blog.ionicframework.com/introducing-ionic-4-ionic-for-everyone/

Whee!

Posts: 4

Participants: 3

Read full topic

Bring back the v3 docs

`ion-scroll` dynamic height

$
0
0

@Eric_Horodyski wrote:

I have an app where the design is similar to AirBNB, where there are multiple horizontal scrolling inifinite-loading lists.

Unfortunately, when using <ion-scroll scrollX="true">, I am unable to get the content that resides within to display unless specifically set a height value (height: auto doesn’t work):

<ion-content>
    <ion-scroll scrollX="true">
        <div *ngFor="let item of items">
            <h1>{{item}}</h1>
        </div>
    </ion-scroll>
</ion-content>

Am I missing something here, or is the only way to set the height I need will be through making a reference to the child element, get it’s height, and set the <ion-scroll> height through the component’s code?

Posts: 1

Participants: 1

Read full topic

Announcing Ionic 4: Neutronium!

$
0
0

@brandyshea wrote:

Hello Ionites! :wave:

I am beyond excited to announce Ionic Framework 4.0.0 Neutronium ! :balloon:

“Ionic for Everyone” :globe_with_meridians:

We’re calling Ionic 4 “Ionic for Everyone” as it is the most accessible and future-proof version of Ionic that we’ve ever built, while also being the fastest and most complete.

With today’s release, Ionic Framework is now distributed as a set of Web Components using the Custom Elements and Shadow DOM APIs available in all modern mobile and desktop browsers.

This means that practically every web developer in the world can now use Ionic’s components in their mobile, desktop, and Progressive Web Apps—just by using Ionic’s custom HTML tags in their app.

The Best Ionic Yet :zap:

Every one of the nearly 100 Ionic components has been evaluated for performance, theme customizability, and platform look and feel. We’ve seen significant improvements on First Meaningful Paint for developers using Angular with Ionic 4, and this is just the beginning.

Built for Customization :art:

One of the biggest changes under the hood is the move to using native CSS Custom Properties, also known as CSS Variables, in each component. CSS Variables allow a developer to modify the look of Ionic components without knowing the internals of its Sass/CSS styles.

More on theming with CSS variables can be found in our documentation: https://ionicframework.com/docs/theming/css-variables/

Revamped Documentation :spiral_notepad:

Today we launched a major revamp for the official Ionic Documentation, which along with dramatically improved performance also includes a simpler design focused on content, and an easier-to-navigate organization. We’re not quite done with the documentation, but we believe the combined components and API reference make it easier for developers to find the information they need.

Check out the new docs here: https://ionicframework.com/docs/

Use your Framework’s Tooling :a:

With Ionic 4, we now use your framework’s official tooling for building, bundling, and routing, so you can get the most out of your framework’s ecosystem and we can focus on what we do best.

That means you’ll use the Angular CLI when using Ionic with Angular, Vue CLI with Vue.js, and so on.

Read more on framework tooling on our blog here: https://blog.ionicframework.com/let-framework-do-its-job/

React and Vue, too :scream:

Our official Vue.js and React bindings are currently in alpha and you can expect them to be a big part of the Ionic 4 developer experience going forward. We are incredibly bullish on these two frameworks and expect that the majority of Ionic developers will eventually build apps with one or both.

If you’d like to try the alpha versions today, take a look at the React README and the Vue README in our repo. Don’t worry, we will make it way easier to use these projects soon.

Thank you :heart:

We want to extend a huge “thank you!” to the entire Ionic community. We’ve been teasing Ionic 4 for a while now, and in an ecosystem filled with change and uncertainty, we are grateful to have had your trust and patience throughout the entire process.

We also want to thank the Ionic community members who took a big bet on Ionic 4 and shipped real apps even though it was alpha and we said very clearly it wasn’t production ready .

Last but not least, we want to thank the wonderful contributors that have stepped up to help Ionic 4, whether that was by submitting PRs, helping test new releases, or creating educational content for the community: None of this would be possible without your help.

Getting Started and Migrating

Getting started with Ionic 4 is easy. Follow the Getting Started Guide, or create a new project directly from the Ionic CLI:

npm install -g ionic # Update the Ionic CLI
ionic start awesome-app

For teams looking to migrate from an older version of Ionic to Ionic 4, we can help! Along with a fully-supported version of Ionic Framework for Enterprises building mission-critical apps (including Cordova/Capacitor native plugin support!), we have Advisory Services available for teams that need assistance. Plus, we’ve also published a Migration Guide for self-directed migrations, along with some tools to help ease the process.

Ionic 3

Looking for the old Ionic 3 documentation or source code? See the following links:

Useful Links

https://blog.ionicframework.com/introducing-ionic-4-ionic-for-everyone/

Posts: 2

Participants: 1

Read full topic

Viewing all 70435 articles
Browse latest View live


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