These are chat archives for angular/material

14th
Jan 2018
Rumes Shyaman
@rumes
Jan 14 2018 16:33
hey I'm getting
`Uncaught Error: Template parse errors:
'app-header-layout' is not a known element:
  1. If 'app-header-layout' is an Angular component, then verify that it is part of this module.
  2. If 'app-header-layout' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<app-header-layout></app-header-layout>`
my app module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';

import { ServiceWorkerModule } from '@angular/service-worker';
import { AppComponent } from './app.component';

import { environment } from '../environments/environment';
import { LayoutsModule } from './layouts/layouts.module';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    LayoutsModule,
    AppRoutingModule,
    environment.production ? ServiceWorkerModule.register('/ngsw-worker.js') : []
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
and my layouts module
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

// metiral imports
import {MatButtonModule} from '@angular/material/button';
import { HeaderLayoutComponent } from './header-layout/header-layout.component';

@NgModule({
  imports: [
    CommonModule,
    MatButtonModule,
  ],
  declarations: [HeaderLayoutComponent]
})
export class LayoutsModule { }
and header lay out component is
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-header-layout',
  templateUrl: './header-layout.component.html',
  styleUrls: ['./header-layout.component.css']
})
export class HeaderLayoutComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}
can anyone help with me?.
Rumes Shyaman
@rumes
Jan 14 2018 16:41
and app.component.html
<app-header-layout></app-header-layout>
<router-outlet></router-outlet>