'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

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript