林发送一个事件像这样删除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 –