I am having trouble adding 2 empty person
objects to an array and then populating it. In Chrome, the error message
TypeError: object is not a function at new <anonymous>
appears. What could be causing this issue?
$scope.person = {
firstName: '',
lastName: '',
dateOfBirth: '',
sex: '',
nationality: ''
};
$scope.persons = [];
$scope.persons.push(new $scope.person); // error
$scope.persons.push(new $scope.person);