Explanation:
The error “property ngforof is not provided by any applicable directive on an embedded template” occurs when you try to use the ngForOf directive in your template but it is not available or not properly imported in your component.
ngForOf is a built-in directive provided by Angular for iterating over a collection and creating multiple elements based on that collection. It is commonly used with *ngFor syntax in Angular.
To fix this error, you need to make sure that you have imported the CommonModule or BrowserModule in your module file where you are using the ngForOf directive.
Here’s an example of how to use ngForOf directive:
<ul>
<li *ngFor="let item of items">{{ item }}</li>
</ul>
In this example, the ngForOf directive is used to iterate over the items array in the component and create an li element for each item in the array.
Make sure you have the necessary imports and the correct syntax in your template to use ngForOf directive. This should resolve the “property ngforof is not provided by any applicable directive on an embedded template” error.