I am just beginning with Angular. When I try to run my angular app, it just shows a blank page and on inspecting it I find the app-root is empty. So I opened the app.component.ts file and find some error there
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls:['./app.component.scss']
})
export class AppComponent {
title = 'My Angular App';
}
Here at the component directive the error says
Argument of type '{ selector: string; templateUrl: string; styleUrls: string[]; }' is not assignable to parameter of type 'Component'.
Property 'true' is missing in type '{ selector: string; templateUrl: string; styleUrls: string[]; }'.
I didnt understand what I did wrong. Angular version 7
npm cache clean, andnpm installfresh is your best bet from here w/o more info. Other info needed would be the HTML where you have the<app-root></app-root>and theapp-roothtml itself. Make sure you have all theimportsin your app-module. Look at theapp-rootHTML and make sure all other components used in it are imported in it's module. - nircraft