0
I have a modal with a form on a page with a list of registered items:
<div class="collection">
<div class="collection-item row" *ngFor="let data of data$ | async">
<div class="col s7">
{{ data.name }}
</div>
<div class="col s5">
<a title="Editar"><i class="fas fa-edit right"></i></a>
</div>
</div>
</div>
<!-- botão que abre modal -->
<div class="fixed-action-btn">
<a
class="btn-floating btn-large modal-trigger"
href="#modal1">
<fa-icon [icon]="['fas', 'plus']"></fa-icon>
</a>
</div>
<!-- componente do modal -->
<div id="modal1" class="modal">
<app-register-data>
</app-register-data>
</div>
This modal, when opened by the normal button, creates an empty form, without data, to create a new item. But I want to pass an item to the same form through a inbound property
when opening through the form (whether through function or HTML template).
Internally the component app-register-data
is already about the mistakes if inbound property
is inserted or not:
open object change form 'date'
<div>
<app-register-data [data]="{id: 1, name: 'name'}"></app-register-data>
</div>
open object registration form 'date'
<div>
<app-register-data></app-register-data>
</div>
pq vc does not pass [data]="null", did not understand what the problem is
– Eduardo Vargas
The problem is this: there are two points where I want to call the same modal, but each with different data.
– Arthur Siqueira