내 html보기에이 항목이 있습니다.정의되지 않음의 빨간색 속성을 설정할 수 없습니다.
<form name="adduser" id="signupForm" novalidate>
<span>First Name</span>
<label class="item item-input" id="profileLabel">
<input id="profileInput" type="text"
ng-model="user.fname"
class="form-control"
placeholder="{{fnamePlaceholder}}"
ng-minlength="1" >
</label>
<div id="name-group" class="form-group-lg">
<button type="submit" ng-click="updateData(user)" id="initiateSignUp" class=" button button-positive button-block" >
Save and continue
</button>
</div>
</form>
이것은 내 컨트롤러
$scope.updateData=function(user){
console.log (user.fname)
}
의 시작하지만 난
TypeError: Cannot read property 'fname' of undefined
'$ scope'이 (가) 무엇입니까? $ scope가 사용자 인 경우 ng-model = "fname"이 아닐 수도 있습니다. 문제는 사용자가 정의되지 않았습니다. –