I am working on a playlist component that receives an input 'playlist' from its parent component. This input is an object of arrays structured as follows:
playList: {
headerPlaylists: Array<any>,
bodyPlaylists: Array<any>
} = {
headerPlaylists: [],
bodyPlaylists: []
}
The child component code looks like this:
@Component({
selector: 'playlist',
styleUrls: ['app/channel/playlist/playlist.css'],
templateUrl: 'app/channel/playlist/playlist.html',
directives: [VideoItemComponent],
inputs: ['playlist']
})
My main question is, how can I access the 'playlist' input in my class? For example, if I want to simply log the playlist contents using console.log(playlist), what would be the correct way to do so?
export class PlaylistComponent {
constructor() {
}
}