Невозможно воспроизвести проблему на stackblitz ... возможно, вы что-то упустили;
любезно проверьте рабочий стек стека здесь
Я использовал ваш HTML / CSS, ниже приведен соответствующий файл ts :
import {Component} from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
@Component({
selector: 'card-fancy-example',
templateUrl: 'card-fancy-example.html',
styleUrls: ['card-fancy-example.css'],
})
export class CardFancyExample {
bookItems:any[];
newContact = new FormGroup({
title: new FormControl(''),
author: new FormControl(''),
genre: new FormControl(''),
price: new FormControl(''),
});
constructor(){
this.bookItems = [
{ title:'test title' ,description:'test descr ' ,author:'test author' ,genre:'test1 genre' ,publish_date:'test date' ,price:'test price' }
,{ title:'test title' ,description:'test descr ' ,author:'test author' ,genre:'test1 genre' ,publish_date:'test date' ,price:'test price' }
,{ title:'test title' ,description:'test descr ' ,author:'test author' ,genre:'test1 genre' ,publish_date:'test date' ,price:'test price' }
,{ title:'test title' ,description:'test descr ' ,author:'test author' ,genre:'test1 genre' ,publish_date:'test date' ,price:'test price' }
,{ title:'test title' ,description:'test descr ' ,author:'test author' ,genre:'test1 genre' ,publish_date:'test date' ,price:'test price' }
];
}
}