How do I make a submit with the Onsen UI + AngularJS ?
I have the following ons-page :
<ons-page ng-controller="LoginController">
<ons-toolbar>
<div class="center">Acesso ao Sistema</div>
</ons-toolbar>
<form action="@Url.Action("Login", "Account")" method="post" id="loginForm"
class="login-form">
@Html.AntiForgeryToken()
@Html.ValidationSummary(true, "")
@Html.EditorFor(m => m.Email, new { htmlAttributes = new {
@class = "text-input--underbar",
placeholder = "E-mail",
autofocus = "autofocus"
} })
@Html.ValidationMessageFor(m => m.Email)
@Html.PasswordFor(m => m.Password, new {
@class = "text-input--underbar",
placeholder = "Senha"
})
@Html.ValidationMessageFor(m => m.Password)
<br><br>
<ons-button modifier="large" class="login-button">Login</ons-button>
<br><br>
<ons-button modifier="quiet" class="forgot-password">
Esqueceu sua senha?
</ons-button>
</form>
</ons-page>
@section scripts {
<script src="~/Static/js/controllers/loginController.js"></script>
}
Plugins render in the required order:
<script src="/Static/vendor/angular/angular.min.js"></script>
<script src="/Static/vendor/onsenui/js/onsenui.min.js"></script>
<script src="/Static/js/controllers/loginController.js"></script>
Content from loginController.js
:
(function () {
var module = ons.bootstrap("loginModule", ["onsen"]);
//module.controller("AppController", function ($scope) { });
//module.controller("MainController", function ($scope) { });
module.controller("LoginController", function ($scope) { });
})();