I use Material Design in new Angular 2. I connected this to app.module like as:
import {MdButtonModule, MdCheckboxModule} from '@angular/material';
import {MdGridListModule, MdCardModule} from '@angular/material';
@NgModule({
imports: [
MdButtonModule,
MdCheckboxModule,
MdGridListModule,
MdCardModule
],
When page is loaded I get errors in console:
VM1967 vendor.bundle.js:63286 Uncaught Error: Template parse errors:
'md-grid-tile' is not a known element:
1. If 'md-grid-tile' is an Angular component, then verify that it is part of this module.
2. If 'md-grid-tile' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
<md-grid-list cols="7" rowHeight="2" id="weekly_schedule">
How to fix? I tried any ways.
Full file is with connected material(now it dont give any errors but page is loaded unlimite in browser)
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { CoreModule } from '../core/core.module';
import { SharedModule } from '../shared/shared.module';
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
import { QuoteService } from './quote.service';
import { BrowserModule } from '@angular/platform-browser';
import {MdButtonModule, MdCheckboxModule} from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {MdGridListModule, MdCardModule} from '@angular/material';
@NgModule({
imports: [
BrowserAnimationsModule,
BrowserModule,
CommonModule,
TranslateModule,
CoreModule,
SharedModule,
HomeRoutingModule,
MdGridListModule
],
declarations: [
HomeComponent
],
providers: [
QuoteService
]
})
export class HomeModule { }