Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing Angular Material in Stackblitz

I have imported material(7.2.1) in my stackblitz link,

Still I am unable see the exact UI of material

I have tried to figure out, but no result. Here the stackblitz which i have created.

like image 356
PGH Avatar asked Jan 10 '19 06:01

PGH


People also ask

Can I use angular CLI in StackBlitz?

StackBlitz supports Angular CLI commands in the user interface.

How do I download angular projects from StackBlitz?

Download the project zip from StackBlitz. Create a blank local Angular project with the CLI: ng new my-project-name. Replace the /src folder of the new project with the /src folder of the StackBlitz download. npm install inside the project directory and ng serve (or npm start )


1 Answers

Angular Material lets you know what the issue is in the console:

Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming

You are not importing a core theme from Angular Material. Add this line to your styles.css:

@import '@angular/material/prebuilt-themes/deeppurple-amber.css';

See this link in the official documentation.

like image 149
Fabian Küng Avatar answered Oct 20 '22 01:10

Fabian Küng