Witam mam problem generalnie mam prosty formularz w Angularze chciałem z niego wyciagnać dane . Wciagnac je w zmienna dane i wypchnac jako dane do GET.
<div class="col-md-4 col-md-offset-0" >
<p> Znajdz Użytkownika</p>
<div class="form-group row">
<div class="col-sm-8">
<form class="login-form" ng-submit="VC3.simpleGetCall()">
<input type="email" class="form-control" id="inputEmail3" placeholder="Podaj Email Użytkownika" ng-model="VC3.input.email" required>
</form>
</div>
</div>
<button ng-click="simpleGetCall(true)" type="submit" class="btn btn-primary">Zatwierdzam</button><br />
</div>
i kontroler który miałby je przejąć
app.controller('View3Ctrl', ['$scope', '$http' , function($scope, $http) {
$scope.simpleGetCall = function() {
var dane;
$http({
method: 'GET',
url: 'XXXXXXX',
cache: true,
data: dane,
headers: { 'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': tokenn }
})
.success(function(data, status, headers, config) {
})
.error(function(data, status, headers, config) {
$scope.errorMsg = 'Unable to submit form';
})
}
}]);
Dziękuje za pomoc :)