Samy Samy - 1 year ago 100
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
chartName: string;
img: string;

songList[]: Song;


Answer Source

Your declartion is invalid, should be:

songList: Song[]

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download