0

I created a component called IsiComponent and I am including the module file in one of my pages module file which looks like

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { IonicModule } from '@ionic/angular';

import { CalculatorPage } from './calculator.page';
import { IsiModule } from '../isi/isi.module';

const routes: Routes = [
  {
    path: '',
    component: CalculatorPage
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes),
    IsiModule
  ]
})
export class CalculatorPageModule {}

The IsiComponent module file:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { IonicModule } from '@ionic/angular';
import { IsiComponent } from './isi.component';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
  ],
  declarations: [IsiComponent],
  exports: [IsiComponent]
})
export class IsiModule {}

In my calculator page html file I initiate the component via

<ion-footer>
  <app-isi></app-isi>
</ion-footer>

When I open my page, the component doesn't render until I do some interaction with something on the screen like, focus an input or select a radio button. Any idea why that would be happening?

Oh also, it renders fine when I am testing in chrome. It isn't rendering using the Ionic DevApp on my iphone.

I found this post which sounds like the same behavior, but it looks like we are doing different things Ionic 3 not updating view

Ronnie
  • 11,138
  • 21
  • 78
  • 140
  • My suggestion would be to state at the top that it works in Chrome but not the DevApp as that is a key consideration when reading through the rest of the question. – DeborahK Dec 28 '18 at 00:02
  • @DeborahK thank you for the suggestion. I have edited my title – Ronnie Dec 28 '18 at 00:23
  • How are you rendering the component / page? Is there an async operation, such as an API request retrieving data prior to render? – Dylan w May 22 '19 at 00:17

0 Answers0