Im using angular in ionic application but in a modal the ngForm doesnt works. I think its cleary whit a simple code.
<li *ngFor="let item of [1,2,3,4,5]; let i = index">
{{i}} {{item}}
</li>
this code show this in all rest of page ->
but in a modal create like this
async presentModal(test){
const modal = await this.modalController.create({
component: TestPage,
componentProps: {
test
}
});
modal.onWillDismiss().then(dataReturned => {
});
return await modal.present();
}
dont show anything. Any suggest why in the modal the *ngFor o even the *ngForm doesnt work? Something im missing? Thanks.
PD: I can do every thing i want in the modal and works like write "hello" or something the modal show correctly but the ngform dont show anything.
PD2:
Also mu module.ts with all i try to import searching something to fix this...
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule, NavController } from '@ionic/angular';
import { TestPageRoutingModule } from './test-routing.module';
import {ReactiveFormsModule} from '@angular/forms';
import { TestePage } from './test.page';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from 'src/app/app.component';
@NgModule({
imports: [
BrowserModule,
IonicModule,
CommonModule,
FormsModule,
TestPageRoutingModule,
ReactiveFormsModule
],
providers: [
BrowserModule,
IonicModule,
CommonModule,
ReactiveFormsModule,
NavController
],
declarations: [TestPage],
bootstrap: [AppComponent]
})