1
Вот моя формаКак получить значение из данных формы в угловом JS
<form>
<input class="text_box1" type="text" name="email" ng-model="forget.email" >
<button style="width:auto" class="sign_up" ng-click="doForget(forget)">Get a Password</button>
</form>
Внутри моего app.js
меня
.when('/forget', {
title: 'forget',
templateUrl: 'resources/views/forget.php',
controller: 'authCtrl'
})
И внутри контроллера authCtrl
$scope.doForget = function (customer) {
Data.post('eloquent.php', {
customer: customer
}).then(function (results) {
if (results == "1")
{
$location.path('login');
}
});
};
Я звоните eloquent.php
Но как я могу получить значение электронной почты от forget.php
и отправить в eloquent.php
?
Вы c получите значение по адресу 'email = $ scope.forget.email;', чтобы получить значение, и вы можете внести его в локальное хранилище и отправить его на свой 'eloquent.php'. –