Samy Samy - 5 months ago 44
Javascript Question

Array with Objects

I started learning AngularJS but had a little problem....
What is wrong here ? I try to declare songlist as an array with Song Objects but get an error to use "="

import { Song } from './song.model';

export class Chart
{
id:number;
chartName: string;
img: string;
createDate:string;

songList[]: Song;

}

Answer

Your declartion is invalid, should be:

songList: Song[]