1
이온이 포함 된 프로젝트를 만들고 있습니다. 여기
내 간단한 컨트롤러 :var app = angular.module('myApp', ['ionic']);
app.controller("loginController", ['$scope', function($scope){
$scope.userName = ""
$scope.password = ""
$scope.login = function(){
//some login things here
};
}]);
내 HTML 내가 버튼을 로그인을 클릭하면
<ion-content ng-controller="loginController">
<form class="list" ng-submit="login()">
<label class="item item-input">
<span class="input-label">Username</span>
<input type="text" ng-bind="userName">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input type="password" ng-bind="password">
</label>
<button class="button button-block button-positive">
Login
</button>
</form>
</ion-content>
이 Login
기능들이받은됩니다하지만 난 userName
에 액세스하고 password
변수 때문에 할 수없는 사이 $scope
은 정의되지 않음
합니다. 가능할 때 이것을 대답으로 표시하겠습니다. 감사. – Sefa
도움이 된 것을 환영합니다. – dfsq