用于 Web 的材料组件与 Angular Material 2 [英] Material Components for the Web vs Angular Material 2

查看:23
本文介绍了用于 Web 的材料组件与 Angular Material 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,MDL(Material Design Lite)项目的继任者作为Material Components for网络.它的目标之一是与其他 JS 框架和库的无缝集成".

Recently, the successor to MDL (Material Design Lite) project was launched as Material Components for the Web. One of its goals is "Seamless integration with other JS frameworks and libraries".

还有另一个项目 Angular Material2,它专门为 Angular (v2+) 提供材料设计组件.

There is another project Angular Material2 which provides material design components specifically for Angular (v2+).

这两个项目都在创建基于材料设计的UI 组件.此外,它们具有类似的组件集就绪/in-active-development,以及即将推出的相同组件集(列出 这里此处).

Both projects are creating material design based UI components. Also, they have similar set of components ready/in-active-development, and same set of components as coming-soon (listed here and here).

有人可以帮我了解两个项目之间的重叠,我应该为新项目选择哪一个?

Can someone please help me understand the overlap between 2 projects and which one should I pick for new projects?

在基本层面上,我确实理解 Angular Material2 将与 Angular 项目更加无缝和紧密地集成,而 Material Components for the Web 将为多个 JS 框架提供钩子以供使用.但我看不出重叠的原因以及哪个会更有动力(阅读更多组件).

At a fundamental level, I do understand Angular Material2 will more seamlessly and tightly integrate with Angular projects, while Material Components for the Web will provide hooks for multiple JS frameworks to use. But I fail to see reason for overlap and which one will have more momentum (read more components).

推荐答案

完全披露:我致力于网络材料组件,所以我的意见可能有点偏见:)

Full disclosure: I work on Material Components for the web, so my opinion may be a bit biased :)

TL;DR 使用任何可以帮助您以最有效的方式构建 UI 的库,或者将它们并排使用.查看我们的 angular2 集成示例 angular-mdc-web了解如何使用 ng2 包装 MDC-Web 组件.

TL;DR use whichever library helps you build your UI in the most efficient way possible, or use them side-by-side. Check out our angular2 integration example angular-mdc-web to see how to wrap a MDC-Web component using ng2.

网页材料组件(缩写.MDC-Web)的目标,正如前面提到的,是为整个网络平台创建材料设计组件的规范实现.Angular/material2 是一个优秀的库——我们材料设计团队中的许多人,包括我自己,都为它做出了贡献——但它对非 angular2 应用程序来说是排他性的.此外,React、Aurelia、Vue 等非谷歌库和框架没有官方解决方案来满足他们的需求.

The goal of Material Components for the web (abbrev. MDC-Web), as has been alluded to, is to create a canonical implementation of Material Design components for the entire web platform. Angular/material2 is an excellent library - many of us on the Material Design team, myself included, have contributed to it - but it is exclusionary to non-angular2 applications. Additionally, non-google libraries and frameworks such as React, Aurelia, Vue, and others have no official solution to suit their needs.

话虽如此,Angular2 属于我们整个网络平台"的范围,因此我们肯定希望支持它.在这两个项目的这个阶段,我们可能有一些你需要的组件,而 angular/material2 没有,反之亦然.我鼓励您使用任何可以帮助您以最佳方式实现目标的库.这可能是 angular/material2,也可能是 MDC-Web,或者老实说,可能两者兼而有之.例如,您可以使用 我们的选择组件 沿着 material2 的组件,事情应该可以正常工作.正如 TL;DR 中所述,angular-mdc-web 是一个功能齐全的库将 MDC-Web 包装在惯用的 angular2+ API 中.

That being said, Angular2 falls under our scope of the "entire web platform", and we definitely want to support it because of that. At this stage in both projects, we may have some components you need that angular/material2 does not, or vice versa. I'd encourage you to use whichever library helps you accomplish your goals in the best way possible. That could be angular/material2, it could be MDC-Web, or quite honestly it could be both. For example, you could use our select component along side material2's components, and things should work just fine. As mentioned in the TL;DR,angular-mdc-web is a fully-featured library that wraps MDC-Web in an idiomatic angular2+ API.

最后一点,MDC-Web 是唯一一个由 Material Design 团队自己开发的库.因此,我们能够与编写 Material Design 规范的同一个人协作和迭代.

On a final note, MDC-Web is the only library that is developed by the Material Design team itself. Because of this, we are able collaborate on and iterate with the same people who author the Material Design spec.

这篇关于用于 Web 的材料组件与 Angular Material 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆