Are Layout Directives supported by Angular 2 Material Design Components?

前端 未结 3 1852
悲&欢浪女
悲&欢浪女 2021-01-30 10:09

I\'m trying to use the Angular2 Material Design components, and I can\'t get any of the layout directives to work. Example:

According to the examples, this should \"just

3条回答
  •  情歌与酒
    2021-01-30 10:55

    No need to write a new directive until Material2 provide us the LayoutModule.

    You just have to import the angular layouts-attributes.css from angular1. It takes the old directive as css selector.

    require('node_modules/angular-material/modules/layouts/angular-material.layouts-attributes.css')

    for example the css for directive layout-align="end" it use the css selector: [layout-align="end"]

提交回复
热议问题