I know it seems like a duplicate but it isn't. Nothing worked, whatever I tried.
I have a list in my angular module:
this.checkedInterviews = []
and then a function that does:
var interviewModel = {
interviewId: self.pendingInterviews[i].id,
status: self.pendingInterviews[i].status,
location: self.pendingInterviews[i].location,
start: self.pendingInterviews[i].start,
hideCheck: null
};
this.checkedInterviews.push(JSON.stringify(interviewModel));
I get Cannot read property 'push' of undefined.
ANy idea what the problem is?
thisinthis.checkedInterviews.pushisn't the samethisas thethiswhen youthis.checkedInterviews = []- as your code is extremely sparse, it's hard to say whythis.checkedInterviews = []is correct