4baaf9f984
* Simple Boot REST application and example * BAEL-509 - Removed extra duplicate ant matcher * Example and Unit Tests * documentation * BAEL-1085 - changes per PR code review and document review - altered integration to unit test - all's good * BAEL-1085 - Renamed unit tests and added both to pom.xml * IntelliJ formatter * REVERT - Had removed a duplicate ant matcher from BAEL-509 - this was the incorrect process - reverting now, article has been corrected, but will issue a seperate PR for this
27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
angularApp
|
|
.controller('requestBody', function ($scope, Form) {
|
|
$scope.postForm = function (context) {
|
|
var userField = document.getElementById('userField');
|
|
var passwordField = document.getElementById('passwordField');
|
|
if (userField.value != '' && passwordField.value != '') {
|
|
Form.post(context, userField.value,
|
|
passwordField.value).then(function (v) {
|
|
|
|
});
|
|
}
|
|
};
|
|
})
|
|
|
|
.controller('responseBody', function ($scope, Form) {
|
|
$scope.response = "RESPONSEBODY WILL SHOW HERE";
|
|
$scope.postForm = function (context) {
|
|
var userField = document.getElementById('userField');
|
|
var passwordField = document.getElementById('passwordField');
|
|
if (userField.value != '' && passwordField.value != '') {
|
|
Form.post(context, userField.value,
|
|
passwordField.value).then(function (v) {
|
|
$scope.response = v;
|
|
});
|
|
}
|
|
};
|
|
}); |