Angular2 Material2没有显示但正在工作

前端之家收集整理的这篇文章主要介绍了Angular2 Material2没有显示但正在工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的假设是我的CSS不正确,但唉,我无法弄清楚这一点. @H_502_1@<div *ngIf="loading"> <md-progress-circle mode="indeterminate" color="warn">Loading...</md-progress-circle> </div> <md-list> <md-list-item *ngFor="let incident of incidents"> <h3 md-line> {{name}} </h3> <p md-line> <span>{{date}} > </span> <span>{{text}}</span> </p> </md-list-item> </md-list>

您需要确保使用@ angular / material的主题.

getting started guide

Include the core and theme styles:

This is required to apply all of the core and theme styles to your
application. You can either use a pre-built theme,or define your own
custom theme.

  • See the 07001 for instructions.

我发现使用没有主题的@ angular / material只能在某些时候使用.文本输入工作但无线电按钮,复选框 – 并且它似乎是微调器 – 需要主题才能正常工作.

如引用中所述,您可以使用其中一个提供的主题(目前提供6个主题)或创建自己的主题.使用@import(‘〜@ angular / material / core / theming / prebuilt /< theme> .css’)可以将提供的主题包含在您的CSS中.

猜你在找的Angularjs相关文章