添加material ui库

ng add @angular/material

  自定义预构建主题

? Choose a prebuilt theme name, or "custom" for a custom theme: Custom
? Set up global Angular Material typography styles? Yes
? Set up browser animations for Angular Material? Yes

  创建mat.module

ng g module mat

  写个例子

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';


@NgModule({
  declarations: [],
  imports: [
    CommonModule,
    MatButtonModule 
  ],
  exports:[
    MatButtonModule
  ]
})
export class MatModule { }

 

上一篇:java3D与计算机图形学期末复习 第三章 (3)


下一篇:vue模糊查询无反应