Angular Uncaught Error

0

Dodałem taki wpis do pliku html i nic się nie wyświetla, konsola pokazuje mi taki błąd.

<app-nowy *ngFor="let i of [1, 2, 3, 4]"></app-nowy>
Uncaught Error: Template parse errors:
'app-nowy' is not a known element:
1. If 'app-nowy' is an Angular component, then verify that it is part of this module.
2. If 'app-nowy' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
</ul> -->

[ERROR ->]<app-nowy *ngFor="let i of [1, 2, 3, 4]"></app-nowy>
<!-- <p>
  Witamy na kursie {{title | uppercase}"): ng:///AppModule/AppComponent.html@21:0
    at syntaxError (compiler.js:1021)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:14830)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:24018)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:24005)
    at compiler.js:23948
    at Set.forEach (<anonymous>)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:23948)
    at compiler.js:23858
    at Object.then (compiler.js:1012)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:23857)
0

Błąd wydaje się dosyć jasny - której części nie rozumiesz? :-P

0

Nie rozumiem bo mam pierwszą styczność z Angularem i TS.

0

Nazwałeś swój komponent app-nowy, lecz nigdzie w Angularze nie zarejestrowałeś takiej nazwy.
Idziesz zgodnie z jakimś poradnikiem czy zgadujesz?

1 użytkowników online, w tym zalogowanych: 0, gości: 1