how init empty array?
test: any[]; //on change want add item array test(){ this.test.push('a'); }
error ts2339: property 'push' not exist on type '() => void'.
you don't initialize array, test
undefined
. able use it, initialize way:
test: any[] = [];
Comments
Post a Comment