林發送一個事件像這樣刪除Angular2:從孩子送到一個以上的事件父組件
<child-component *ngFor = "#todo of array" [taskobject] = "todo"
(childevent) = "deleteparent($event)">Loading...</child-component>
我怎麼能一起發送的另一事件與childevent,是逗號seprated?喜歡這個?
<child-component *ngFor = "#todo of array" [taskobject] = "todo"
(childevent) = "deleteparent($event)",
(updateevent)> = "(updateparent)"Loading...</child-component>
還爲編輯/更新請求HTTP什麼,我應該請求服務器,是它也http.put在服務器端,是server.put(「URL」)?
更新:
<child-component *ngFor = "#todo of array"
[taskobject] = "todo" (childevent) = "deleteparent($event)"
; (updatevent) = "updateparent($event)">Loading...</child-component>
用分號';'分隔的幾個表達式應該可以工作。不明白'htt.put'或'server.put('url')'是什麼意思。 –
其例如,http.delete在客戶端,server.get()在服務器端,即時通訊todo應用程序 – blackHawk
https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods –