Twitter bootstrap HTTP Get请求2之前的模式加载
我有一个数据表。当我单击表中的行时,会发送对id的Http调用,并打开一个包含数据的模式。但是modal没有得到数据。我有响应,但我认为模态是在响应之前呈现的。如何在单击时将数据显示到模式中 模板:Twitter bootstrap HTTP Get请求2之前的模式加载,twitter-bootstrap,angular,modal-dialog,Twitter Bootstrap,Angular,Modal Dialog,我有一个数据表。当我单击表中的行时,会发送对id的Http调用,并打开一个包含数据的模式。但是modal没有得到数据。我有响应,但我认为模态是在响应之前呈现的。如何在单击时将数据显示到模式中 模板: Table : <div class="table-responsive"> <div class="table table-striped"> <table class="table table-striped" id="emp_addr
Table :
<div class="table-responsive">
<div class="table table-striped">
<table class="table table-striped" id="emp_address_list">
<thead>
<tr class="sub-header">
<th>
Address
</th>
<th>Type</th>
<th width="15%">Status</th>
</tr>
</thead>
<tbody id="address-list" *ngIf="addressData == null"><tr><td colspan="4" align="center">No Active Records Found.</td></tr></tbody>
<tbody id="address-list" *ngIf="addressData">
<tr *ngFor="let full of addressData " class="{{full.status}}style show-{{full.status}}" data-target="#address-details-modal" data-toggle = "modal" (click)="seperateId(full.ID)">
<td class="{{full.status}}style show-{{full.status}}" >
{{full.address1}} {{full.address2}}
</td>
<td class="{{full.status}}style show-{{full.status}}">
{{full.type}}
</td>
<td class="{{full.status}}style show-{{full.status}}">
{{full.status}}
</td>
</tr>
</tbody>
</table>
</div>
在模态的模板中,查看以下行:
<dl class="dl-horizontal" *ngIF="addressid" >
更改
*ngIf
的大小写http调用在哪里?我得到了响应,但打开时数据没有进入模式。我在单击表行时发送HTTP调用。我保留了一个ngIf,以便在数据存在时渲染数据。我正在从服务器获得响应,但数据未呈现。我认为模式甚至在服务响应之前就已经打开了。在这种情况下我该怎么办?请帮帮我,我改了。事实并非如此。
seperateData(id) {
const eurl='http://localhost/Angular/AddressSeperate.php?id='
const url= `${eurl}${id}`
return this.http.get(url)
.map(this.extractData)
.catch(this.HandleError)
}
<dl class="dl-horizontal" *ngIF="addressid" >