How to solve error in HostResourceResolver?

Shema Jacob picture Shema Jacob · Apr 1, 2020 · Viewed 23.7k times · Source

ERROR in HostResourceResolver: could not resolve styles.css in context of C:/Users/shema/Desktop/angular/RP/ResourcePlanning/src/app/addproject/addproject.component.ts)

Answer

Braian Silva picture Braian Silva · Apr 21, 2020

HostResourceResolver happens when the name of your component is wrong.

form.component.html

Wrong name, need to correct for form-dialog.component.html to resolve.

and my templateUrl is form-dialog.component.html.

@Component({
  selector: 'app-form-dialog',
  templateUrl: './form-dialog.component.html',
  styleUrls: ['./form-dialog.component.scss']
})
export class FormDialogComponent implements OnInit {}