With the emerging of reactjs and angular2, zk and other old ui java frameworks are standing before of going to history library but now angular2 has been integrated into zk and make it having more custom chosen for users so that zk framework is still used for maintainance and new java projects.

Angular 2 is integrated in zk by using  client command binding to communicate with a Java ViewModel at the server-side.


What is client command binding in ZK ? according to Client Binding article, Client Binding can help us publish a ZK’s data binding command on a native html element when interacting with client-side libaries,. For example, you can publish a doClick command in your view model with an onClick event in a html Button.




Angular2 integrate with ZK:
When  integrate with zk, angular is the same as JavaScript library that zk uses. In following I will write out the picture of integration between Angular and ZK


The advantage of integration is that we now can use one port 8080 to run angular-zk app instead of  2 app (frontend,backend).

Reference docs:
https://www.zkoss.org/wiki/Small_Talks/2017/June/Using_Angular_with_ZK