简体   繁体   English

如何将 Angular 4 组件与 vaadin UI 集成?

[英]How to integrate Angular 4 components with vaadin UI?

I want to use Angular 4 with a Vaadin 7 Java application in order to push a considerable amount of UI logic to client-side, reduce server round trips, make the client-side functionality available during slow network connections, and make use of the best features of both frameworks.我想将 Angular 4 与 Vaadin 7 Java 应用程序一起使用,以便将大量 UI 逻辑推送到客户端,减少服务器往返,使客户端功能在慢速网络连接期间可用,并利用最好的两个框架的特点。 I went through the Vaangular project mentioned on Vaadin and AngularJS - happy together article, but it won't work for my requirement since I use Angular 4.我浏览了 Vaadin 和 AngularJS 上提到的 Vaangular 项目 - 一起快乐的文章,但由于我使用 Angular 4,它不能满足我的要求。

Java has nothing to do with Angular, what Vaadin offers for JavaScript are web components built using Polymer 2, which you need to install using bower, integrate them in your index.html file and use the Angular library vaadin provides. Java 与 Angular 无关,Vaadin 为 JavaScript 提供的是使用 Polymer 2 构建的 Web 组件,您需要使用 bower 安装它们,将它们集成到您的 index.html 文件中并使用 vaadin 提供的 Angular 库。 It's all explained on their Web Components page, where there are instructions for Angular.这一切都在他们的 Web Components 页面上进行了解释,其中有 Angular 的说明。 This is their official starter which you can recreate (“Recreating this project”) if you have an existing app.这是他们的官方启动器,如果你有一个现有的应用程序,你可以重新创建(“重新创建这个项目”)。 https://github.com/vaadin/base-starter-angular/blob/master/README.md https://github.com/vaadin/base-starter-angular/blob/master/README.md

这是解释相关主题的详细文章(如何将 Angular 组件与 Vaadin 一起使用): https ://www.flowingcode.com/en/how-to-use-angular-components-with-vaadin/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM