Angular 4 材料是否像引导程序一样具有响应性? [英] Is Angular 4 material responsive like bootstrap?

查看:25
本文介绍了Angular 4 材料是否像引导程序一样具有响应性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Angular 4 开始一个新项目,需要创建响应迅速且令人愉悦的用户界面.

I am starting on a new project with Angular 4 and need to create responsive and pleasant user interface.

  • bootstrap 为您提供响应能力,但没有实质性的感觉
  • angular material 提供了良好的 UI 体验 https://material.angular.io

我知道 bootstrap 并在以前的 AngularJS 应用程序中使用过它,但 angular 材料对我来说是新的.遵循文档似乎很容易,但我找不到响应支持.

I know bootstrap and used it in previous AngularJS apps, but angular material is new to me. It seems easy to follow docs but i cannot find the responsiveness support.

我不想混合使用它们,但无法找到引导程序提供的移动支持的列响应能力.

I don't want to mix them but have not been able to find that column responsiveness for mobile support that bootstrap provides.

我错过了什么吗?angular material 是否支持类似的响应,还是应该在我的应用中同时使用两者?

推荐答案

要在现代 Angular 应用程序中添加响应能力,您可以使用 Flex-layout 它与 material2 完全分开,因此即使不使用它,您也可以使用它material2 在您的应用程序中.

To add responsiveness in modern angular app you can use Flex-layout it is completely separate from material2 so you can use that even without using material2 in your app.

请记住,flex-layout 是基于 Flexbox CSS 所以它是 旧浏览器不支持.

Bare in mind that as flex-layout is based on Flexbox CSS so it is not supported in old browsers.

这里有一些示例

另请查看新的 ngAir 剧集谈论 Flex-Layout

更新:

6.0 开始.0-beta.16 flex-layout 现在有一个 支持 CSS 网格的 API.您可以通过查看 pr#712

Starting from 6.0.0-beta.16 flex-layout now has an API to support CSS Grid. You can find more details by checking pr#712

这篇关于Angular 4 材料是否像引导程序一样具有响应性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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