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

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

问题描述

最近,MDL(材料设计精简版)项目的后继产品发布为网络.其目标之一是与其他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组件的材料设计.而且,它们具有类似的一组组件就绪/此处

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项目更加无缝和紧密地集成,而Web的Material Components将为要使用的多个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.

Web的材料组件(简称 MDC-Web )的目标是,为整个Web平台创建材料设计"组件的规范实现. Angular/material2是一个出色的库-包括我在内的材料设计团队中的许多人对此做出了贡献-但它不适用于非Angular2应用程序.此外,非Google库和框架(例如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属于我们的整个Web平台"范围,因此我们绝对希望为其提供支持.在这两个项目的现阶段,我们可能都需要一些不需要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规范的同一人合作并进行迭代.

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材质2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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