How can I use ngfor in custom component


I am trying to do a custom component like this and I want use the ngfor data to show information. This is my code:

my component:

import { Component, Input } from '@angular/core';
  selector: 'content-info',
  templateUrl: 'content-info.html'
export class contentInfo {
  @Input() content: any;
  constructor() {}

<div class="container-content" *ngFor="let c of content">
  <div class="name" *ngIf="">
  <div class="details">

then in the page i have this

<content-info [content]="datalist"></content-info>

but it shows nothing


Is your component properly declared in your app module?


yes, but I don’t know if I have to do something with the input content in the component?