export * from './dto/create-album.dto';
export * from './dto/update-album.dto';
export * from './../prisma.service';
export * from './albums.service';
export * from './albums.controller';
import { Module } from '@nestjs/common';
//import { PrismaService } from './../prisma.service';
//import { AlbumsService } from './albums.service';
//import { AlbumsController } from './albums.controller';
import { PrismaService, AlbumsService, AlbumsController } from './index';
@Module({
controllers: [AlbumsController],
providers: [AlbumsService, PrismaService],
})
export class AlbumsModule {}
@Input() public album!: Album;
constructor() {
//this.album = [];
this.album = {}; // В типе {} отсутствуют следующие свойства из типа 'Album': album_image, album_count, album_title
}
<li class="col-md-4">
<div class="wm-latest-album-slide">
<figure>
<a href="album-single-post.html" class="graythumb"
><img [src]="album.album_image" alt=""
/></a>
<figcaption>
<a href="album-single-post.html" class="wm-bgcolor"
>{{ album.album_count }} Tracks</a
>
</figcaption>
</figure>
<div class="wm-latest-album-text">
<h2><a href="album-single-post.html">{{ album.album_title }}</a></h2>
<span></span>
<div class="clearfix"></div>
<a href="album-single-post.html" class="wm-bayalbum-btn wm-bgcolor"
>read more</a
>
</div>
</div>
</li>
//Type '{}' is missing the following properties from type 'Album': album_image, album_count, album_title
import { Component, Input, OnInit } from '@angular/core';
import { Album } from '../../models/album';
@Component({
selector: 'app-album-item',
templateUrl: './album-item.component.html',
styleUrls: ['./album-item.component.css'],
})
export class AlbumItemComponent implements OnInit {
//@Input() public album: any;
//@Input() public album: Album[];
@Input() public album: Album;
constructor() {
//this.album = [];
this.album = {};
}
ngOnInit(): void {
console.log(this.album);
}
}