не удалось загрузить (hello.component.ts) - PullRequest
0 голосов
/ 27 марта 2020

Я новичок в angular и столкнулся с проблемой при загрузке страницы. По вопросу см. Скриншот.

hello.component.ts:

import { Component, Input } from '@angular/core';
@Component({
  selector: 'hello',
  template: `<h1>Hello {{name}}!</h1>`,
  styles: [`h1 { font-family: Lato; }`]
})
export class HelloComponent  {
  @Input() name: string;
}

введите описание изображения здесь

1 Ответ

0 голосов
/ 27 марта 2020

Вы можете проверить, что ваш модуль импортировал ваш компонент, как показано ниже.

@NgModule({
  declarations: [
    ...
    HelloComponent  
  ],
...