Cannot read property push of null
问题 while pushing an element for the first time to a child array which is null,I'm getting this error "Cannot read property push of null" But the element gets pushed,and the second time I do everything goes fine.It gets added to the array this.group.departmentsList.push({ name: group.newCategoryName, sortOrder: group.departmentsList.length, type: "category" }); group contains the data and departmentList is the child array which is declared like this: $scope.parentDepartment = [ { departmentsList: