Is Angular 4 material responsive like bootstrap?

前端 未结 2 1836
无人共我
无人共我 2021-01-31 09:37

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

  • bootstrap gives you responsiveness, but no material feel
相关标签:
2条回答
  • 2021-01-31 09:51

    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.

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

    Here are some examples

    Also check out the new ngAir episode episode talking about Flex-Layout

    UPDATE:

    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

    0 讨论(0)
  • 2021-01-31 09:53

    A bit late but I have created a starter template that shows an example of a responsive layout with Material 5 and Angular 5 as well as some simple routing. https://github.com/kenji-1996/material-sidenav-responsive-starter

    Uses Material and Flex, no outside libs

    0 讨论(0)
提交回复
热议问题