Remote Service in Aurelia Component Lifecycle

我们两清 提交于 2019-12-01 21:31:19

Use the attached callback. When a viewmodel has an attached method, aurelia will call it after the view has been added to the DOM. Alternatively you could use the bind callback. It's a bit earlier in the lifecycle than attached and is called after the component has been data-bound (but is not yet attached to the DOM).

Use the detached or unbind methods to cleanup/unsubscribe/cancel any async processes or subscriptions you might have made in attached or bind.

created(view) >> bind(bindingContext) >> attached() >> detached() >> unbind()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!