'mat-card' is not a known element in Angular 7How to move an element into another element?Angular 2 Routing Does Not Work When Deployed to Http ServerAngular 2 'component' is not a known elementCan't use Ionic 3 + Material AngularError: Template parse errors: 'mat-card' is not a known element:Angular4 multiple modules issue'mat-toolbar' is not a known element - Angular 5ng: 'mat-table' is not a known elementCore module component and Shared module implementation in angularAngular mat-divider is not a known element

Using credit/debit card details vs swiping a card in a payment (credit card) terminal

How do Human Traits Work?

At what point in European history could a government build a printing press given a basic description?

Boss wants me to falsify a report. How should I document this unethical demand?

When and what was the first 3D acceleration device ever released?

Plot twist where the antagonist wins

Passively reducing ground loss?

What is quasi-aromaticity?

Compactness of finite sets

Find limit in use of integrals

If a person had control of every single cell of their body, would they be able to transform into another creature?

What are these arcade games in Ghostbusters 1984?

Is it possible to play as a necromancer skeleton?

Binary Search in C++17

How to respond to an upset student?

Employer demanding to see degree after poor code review

A steel cutting sword?

Why aren't space telescopes put in GEO?

Popcorn is the only acceptable snack to consume while watching a movie

Pirate democracy at its finest

How to know if a folder is a symbolic link?

What is the object moving across the ceiling in this stock footage?

Why does a perfectly-identical repetition of a drawing command given within an earlier loop 𝘯𝘰𝘵 produce exactly the same line?

What was the idiom for something that we take without a doubt?



'mat-card' is not a known element in Angular 7


How to move an element into another element?Angular 2 Routing Does Not Work When Deployed to Http ServerAngular 2 'component' is not a known elementCan't use Ionic 3 + Material AngularError: Template parse errors: 'mat-card' is not a known element:Angular4 multiple modules issue'mat-toolbar' is not a known element - Angular 5ng: 'mat-table' is not a known elementCore module component and Shared module implementation in angularAngular mat-divider is not a known element






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I've seen a lot of questions on this but doesn't seem to be the same issue Im encountering. I have just created my 2nd angular project. I have a new component under src/app/employees where I am trying to use in employees.component.html . The error I am getting is:



Uncaught Error: Template parse errors:
'mat-card' is not a known element:
1. If 'mat-card' is an Angular component, then verify that it is part of this module.
2. If 'mat-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<mat-card> </mat-card>


Now, in app.module.ts I have:



import BrowserModule from "@angular/platform-browser";
import BrowserAnimationsModule from "@angular/platform-browser/animations";
import LOCALE_ID, NgModule from "@angular/core";
import HttpClientModule, HTTP_INTERCEPTORS from "@angular/common/http";
import AppRoutingModule from "./app-routing.module";
import AppComponent from "./app.component";
import
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatListModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
from "@angular/material";

@NgModule(
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatListModule,
MatInputModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
],....
)
export class AppModule


And there aren't any errors if I use mat-card in app.component.html.
What am I missing here?










share|improve this question






















  • First you should declare employeesComponent in declarations of your module.

    – Thivanka Saranatha
    Mar 24 at 6:17

















2















I've seen a lot of questions on this but doesn't seem to be the same issue Im encountering. I have just created my 2nd angular project. I have a new component under src/app/employees where I am trying to use in employees.component.html . The error I am getting is:



Uncaught Error: Template parse errors:
'mat-card' is not a known element:
1. If 'mat-card' is an Angular component, then verify that it is part of this module.
2. If 'mat-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<mat-card> </mat-card>


Now, in app.module.ts I have:



import BrowserModule from "@angular/platform-browser";
import BrowserAnimationsModule from "@angular/platform-browser/animations";
import LOCALE_ID, NgModule from "@angular/core";
import HttpClientModule, HTTP_INTERCEPTORS from "@angular/common/http";
import AppRoutingModule from "./app-routing.module";
import AppComponent from "./app.component";
import
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatListModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
from "@angular/material";

@NgModule(
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatListModule,
MatInputModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
],....
)
export class AppModule


And there aren't any errors if I use mat-card in app.component.html.
What am I missing here?










share|improve this question






















  • First you should declare employeesComponent in declarations of your module.

    – Thivanka Saranatha
    Mar 24 at 6:17













2












2








2








I've seen a lot of questions on this but doesn't seem to be the same issue Im encountering. I have just created my 2nd angular project. I have a new component under src/app/employees where I am trying to use in employees.component.html . The error I am getting is:



Uncaught Error: Template parse errors:
'mat-card' is not a known element:
1. If 'mat-card' is an Angular component, then verify that it is part of this module.
2. If 'mat-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<mat-card> </mat-card>


Now, in app.module.ts I have:



import BrowserModule from "@angular/platform-browser";
import BrowserAnimationsModule from "@angular/platform-browser/animations";
import LOCALE_ID, NgModule from "@angular/core";
import HttpClientModule, HTTP_INTERCEPTORS from "@angular/common/http";
import AppRoutingModule from "./app-routing.module";
import AppComponent from "./app.component";
import
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatListModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
from "@angular/material";

@NgModule(
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatListModule,
MatInputModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
],....
)
export class AppModule


And there aren't any errors if I use mat-card in app.component.html.
What am I missing here?










share|improve this question














I've seen a lot of questions on this but doesn't seem to be the same issue Im encountering. I have just created my 2nd angular project. I have a new component under src/app/employees where I am trying to use in employees.component.html . The error I am getting is:



Uncaught Error: Template parse errors:
'mat-card' is not a known element:
1. If 'mat-card' is an Angular component, then verify that it is part of this module.
2. If 'mat-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<mat-card> </mat-card>


Now, in app.module.ts I have:



import BrowserModule from "@angular/platform-browser";
import BrowserAnimationsModule from "@angular/platform-browser/animations";
import LOCALE_ID, NgModule from "@angular/core";
import HttpClientModule, HTTP_INTERCEPTORS from "@angular/common/http";
import AppRoutingModule from "./app-routing.module";
import AppComponent from "./app.component";
import
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatInputModule,
MatListModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
from "@angular/material";

@NgModule(
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
MatButtonModule,
MatFormFieldModule,
MatIconModule,
MatListModule,
MatInputModule,
MatSelectModule,
MatSidenavModule,
MatCardModule,
MatTableModule
],....
)
export class AppModule


And there aren't any errors if I use mat-card in app.component.html.
What am I missing here?







html angular angular-material






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 5:39









WoodyWoody

39711019




39711019












  • First you should declare employeesComponent in declarations of your module.

    – Thivanka Saranatha
    Mar 24 at 6:17

















  • First you should declare employeesComponent in declarations of your module.

    – Thivanka Saranatha
    Mar 24 at 6:17
















First you should declare employeesComponent in declarations of your module.

– Thivanka Saranatha
Mar 24 at 6:17





First you should declare employeesComponent in declarations of your module.

– Thivanka Saranatha
Mar 24 at 6:17












1 Answer
1






active

oldest

votes


















4














I can not see your EmployeesComponent in your list of declarations. The EmployeesComponent need to be declared in the same module as where you import the MatCardModule, like:



declarations: [
EmployeesComponent
],
imports: [
MatCardModule
]


I am guessing either that you have forgotten to declare the EmployeesComponent in your app module, or that you have another module, perhaps Employees module, where you have to import the MatCardModule.






share|improve this answer























  • Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

    – Woody
    Mar 24 at 6:34











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321041%2fmat-card-is-not-a-known-element-in-angular-7%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














I can not see your EmployeesComponent in your list of declarations. The EmployeesComponent need to be declared in the same module as where you import the MatCardModule, like:



declarations: [
EmployeesComponent
],
imports: [
MatCardModule
]


I am guessing either that you have forgotten to declare the EmployeesComponent in your app module, or that you have another module, perhaps Employees module, where you have to import the MatCardModule.






share|improve this answer























  • Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

    – Woody
    Mar 24 at 6:34















4














I can not see your EmployeesComponent in your list of declarations. The EmployeesComponent need to be declared in the same module as where you import the MatCardModule, like:



declarations: [
EmployeesComponent
],
imports: [
MatCardModule
]


I am guessing either that you have forgotten to declare the EmployeesComponent in your app module, or that you have another module, perhaps Employees module, where you have to import the MatCardModule.






share|improve this answer























  • Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

    – Woody
    Mar 24 at 6:34













4












4








4







I can not see your EmployeesComponent in your list of declarations. The EmployeesComponent need to be declared in the same module as where you import the MatCardModule, like:



declarations: [
EmployeesComponent
],
imports: [
MatCardModule
]


I am guessing either that you have forgotten to declare the EmployeesComponent in your app module, or that you have another module, perhaps Employees module, where you have to import the MatCardModule.






share|improve this answer













I can not see your EmployeesComponent in your list of declarations. The EmployeesComponent need to be declared in the same module as where you import the MatCardModule, like:



declarations: [
EmployeesComponent
],
imports: [
MatCardModule
]


I am guessing either that you have forgotten to declare the EmployeesComponent in your app module, or that you have another module, perhaps Employees module, where you have to import the MatCardModule.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 24 at 5:51









SnorreDanSnorreDan

802613




802613












  • Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

    – Woody
    Mar 24 at 6:34

















  • Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

    – Woody
    Mar 24 at 6:34
















Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

– Woody
Mar 24 at 6:34





Thanks. I had EmployeesComponent in app-routing.module.ts. I've made some changes and all is working as expected now.

– Woody
Mar 24 at 6:34



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321041%2fmat-card-is-not-a-known-element-in-angular-7%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현