several unknown elements
Hi, i had already import the @angular/material library, but, when i run the localhost appears too many not known elements in the component.html, this file recognize
I'll leave an image with the errors in console.

Thanks for your help 😃
import { MatCardModule } from '@angular/material';
try add import in ngModule will help.
I had already imported that module, but still throwing the same error :/
Please show your module and which versions of Angular, Material, OS, TypeScript, browsers are affected?
app.module.ts
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CoreModule} from './core/core.module';
import {AppComponent} from './app.component';
import {LoginModule} from './login/login.module';
import {RegisterModule} from './register/register.module';
import {PatientModule} from './patient/patient.module';
import {HttpClientModule} from '@angular/common/http';
import {NgxQRCodeModule} from 'ngx-qrcode2';
import { MatMenuModule, MatButtonModule, MatIconModule } from '@angular/material';
import {MatCardModule} from '@angular/material';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
CoreModule,
FormsModule,
HttpModule,
LoginModule,
RegisterModule,
PatientModule,
HttpClientModule,
NgxQRCodeModule,
MatMenuModule,
MatButtonModule,
MatIconModule,
MatCardModule
],
bootstrap: [AppComponent]
})
export class AppModule {
}
package.json
{
"name": "fast-exp-web",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cdk": "^5.0.0-rc0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.0.0-rc0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"core-js": "^2.4.1",
"datatables.net": "^1.10.16",
"ngx-qrcode2": "0.0.5",
"primeng": "^5.0.2",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.5.2",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
OS: Windows 10 Browser: Google Chrome
Hi,
do you use Submodules for that specific component? If so, you have to add the modules there and not in app.modules.ts.
Though I would like to know a better way here, for example in a shared module or within the root module?
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.