简体   繁体   中英

How add angular/material for ngx-admin

I'm working with ngx-admin and it is familiar with Nebular Theme. But I want to add angular/material for it. I used lazyloading for this project. I tried install material for this by npm i @angular-materials/ngx-admin command. but it not success. I have a component named profile .

profile.component.html

<mat-card>
    <mat-card-header>
        <mat-toolbar class="toolbar">
            <mat-card-title>Contact List</mat-card-title>
            <span class="toolbar-spacer"></span>
            <mat-icon (click)="addContact()">add</mat-icon>
        </mat-toolbar>
    </mat-card-header>
</mat-card>

profile.module.ts

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
MatDialogModule,
MatToolbarModule,
MatIconModule,
MatCardModule
} from '@angular/material';
import { ProfileComponent } from './profile.component';

@NgModule({
declarations: [ProfileComponent],
imports: [
    CommonModule,

    MatDialogModule,
    MatCardModule,
    MatIconModule,
    MatToolbarModule
]
})
export class ProfileModule {}

I want to integrate angular/material with this. Then what I should do for this.

Import this theme into your styles.css file. It will get you material theme

  @import "~@angular/material/prebuilt-themes/indigo-pink.css";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM