也许是愚蠢的问题,但
$scope.registration = {
email: "",
userName: "",
password: "",
confirmPassword: "",
firstName: "DummyFirstName",
lastName: "DummyLastName"
};
我希望userName
与email
相同。
我试过了:
$scope.registration = {
email: "",
userName: email,
password: "",
confirmPassword: "",
firstName: "DummyFirstName",
lastName: "DummyLastName"
};
但是我得到了不存在的错误。
答案 0 :(得分:1)
你可以这样做:
$scope.registration = {
email: "",
password: "",
confirmPassword: "",
firstName: "DummyFirstName",
lastName: "DummyLastName"
};
$scope.registration.userName = $scope.registration.email;