Hey there,
I recently started diving into Angular and I'm loving the learning process.
Currently, I've managed to successfully load a form into my Modal when clicking on "viewDetails".
However, as soon as I modify the Form from <form ngNoForm >
to
<form #editCashMovementForm="ngForm">
, the data stops loading.
I'm aiming to create an editable pop-up form that updates upon submission, but I seem to be stuck at this final hurdle.
If anyone has any advice or guidance, please share!
Thank you
Gws
Component.HTML
<div>
<table class="table table-hover">
<thead>
<tr>
<th><i class="fa fa-text-width fa-2x" aria-hidden="true"></i>Cash Movement ID</th>
<th><i class="fa fa-user fa-2x" aria-hidden="true"></i>PortfolioCode</th>
<th><i class="fa fa-paragraph fa-2x" aria-hidden="true"></i>CCY Out</th>
<th><i class="fa fa-map-marker fa-2x" aria-hidden="true"></i>Account Out</th>
<th><i class="fa fa-calendar-o fa-2x" aria-hidden="true"></i>Date</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let cashmovement of cashmovements">
<td> {{cashmovement.cashMovementId}}</td>
... (data continues)
<td><button class="btn btn-primary" (click)="viewCashMovementDetails(cashmovement.cashMovementId)"><i class="fa fa-info-circle" aria-hidden="true"></i>Edit</button></td>
</tr>
</tbody>
</table>
</div>
<div bsModal #childModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
... (data continues)
Component.ts
import { Component, OnInit, ViewChild, Input, Output, trigger, state, style, animate, transition } from '@angular/core';
... (component.ts content)
data.service.ts
import { Injectable } from '@angular/core';
... (data.service.ts content)
}