天天看点

SAP UI5和Angular的事件处理机制比较

Recently I am studying Angular in my spare time. And I would like to write down here what I have learned about Angular, comparing its design with UI5. In this blog I will only focus on event handling topic.

I have already explained how I do self study on UI5 event handling stuff in this blog , and Andreas Kunz has given very thorough comments on the design idea behind the native event and semantic event, you should NOT miss those comment

UI5 event handling

Let’s quickly review what UI5 developers should do if they need to listen to an event. Still use button as example:

Just call function attachPress and pass in our event handling function as argument:

SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较
SAP UI5和Angular的事件处理机制比较

Hope this blog can help you gain a very basic understanding about Angular event handling

继续阅读