Skip to content

'md-card' is not a known element: #1473

@Yoshiin

Description

@Yoshiin

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The md-card component should work

What is the current behavior?

It is not recognized
`main.ts:14Error: Template parse errors:
'md-card-subtitle' is not a known element:

  1. If 'md-card-subtitle' is an Angular component, then verify that it is part of this module.
  2. If 'md-card-subtitle' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("
    [ERROR ->]Subtitle first
    Card with title</md-card-title"): ProjectComponent@1:3
    'md-card-title' is not a known element:
  3. If 'md-card-title' is an Angular component, then verify that it is part of this module.
  4. If 'md-card-title' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("
    Subtitle first
    [ERROR ->]Card with title

    This is supporting t"): ProjectComponent@2:3
    'md-card-content' is not a known element:

  5. If 'md-card-content' is an Angular component, then verify that it is part of this module.
  6. If 'md-card-content' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("d-subtitle>Subtitle first
    Card with title
    [ERROR ->]

    This is supporting text.


    Lorem ipsum dolor sit amet, co"): ProjectComponent@3:3
    'md-card-actions' is not a known element:

  7. If 'md-card-actions' is an Angular component, then verify that it is part of this module.
  8. If 'md-card-actions' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. (" tempor incididunt ut labore et dolore magna aliqua. Ut enim ad



    [ERROR ->]
    LIKE
    SHARE
    "): ProjectComponent@8:3
    'md-card' is not a known element:
  9. If 'md-card' is an Angular component, then verify that it is part of this module.
  10. If 'md-card' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("[ERROR ->]
    `

What are the steps to reproduce?

Just follow the Read Me

Which versions of Angular, Material, OS, browsers are affected?

@angular/core : 2.0.0
@angular/material : 2.0.0-alpha.9-3
All browsers

Is there anything else we should know?

component.html
<md-card> <md-card-subtitle>Subtitle first</md-card-subtitle> <md-card-title>Card with title</md-card-title> <md-card-content> <p>This is supporting text.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do tempor incididunt ut labore et dolore magna aliqua. Ut enim ad</p> </md-card-content> <md-card-actions> <button md-button>LIKE</button> <button md-button>SHARE</button> </md-card-actions> </md-card>

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 { Routes, RouterModule } from '@angular/router';
import { ChartsModule } from 'ng2-charts/ng2-charts';
import { routing, appRoutingProviders } from './app.routing';

/* App component */
import { AppComponent } from './app.component';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';

/* Core Module */
import { CoreModule } from './core/core.module';

import { MaterialModule } from '@angular/material';

@NgModule({
declarations: [
AppComponent,
PageNotFoundComponent
],
imports: [
BrowserModule,
CoreModule,
MaterialModule.forRoot(),
FormsModule,
HttpModule,
ChartsModule,
routing
],
providers: [
appRoutingProviders
],
bootstrap: [AppComponent]
})
export class AppModule { }
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot reproduceThe team is unable to reproduce this issue with the information provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions