Form-Validierung angepasst

This commit is contained in:
2016-01-07 23:03:01 +01:00
parent 307d5a772c
commit a2b2b6b37e
64 changed files with 198 additions and 67 deletions

View File

@@ -25,7 +25,7 @@
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
</head>
<body ng-app="starter">
<body ng-app="starter" class="platform-android platform-cordova platform-webview">
<!--
The nav bar that will be updated as we navigate between views.
-->

View File

@@ -1,6 +1,6 @@
angular.module('starter.controllers', [])
.controller('DashCtrl', function($scope,$ionicPopup) {
.controller('DashCtrl', function($scope,$ionicPopup,$http) {
$scope.preis="";
$scope.name="";
@@ -18,7 +18,16 @@ angular.module('starter.controllers', [])
if (showAlert==1){
$scope.showAlert();
return;
}
var link = 'http://api.raataar.de/rosen/vorschau.php';
$http.post(link, {name : $scope.name, freitext: $scope.freitext, rosen: $scope.preis}).then(function (res){
$scope.response = res.data;
window.open($scope.response, '_system', 'location=yes');
return false;
});
};

View File

@@ -39,8 +39,8 @@
<div class="row">
<div class="col col-50"><button class="button button-full button-small icon-left ion-image button-custom" ng-click="validate()">Vorschau</button></div>
<div class="col col-50"><button class="button button-full button-small icon-left ion-social-euro button-custom" ng-click="buyAdFree()">Jetzt Kaufen</button></div>
<div class="col col-50"><button class="button button-full button-small icon-left ion-image button-custom" ng-disabled="!$parent.preis || !$parent.name || !$parent.freitext" ng-click="validate()">Vorschau</button></div>
<div class="col col-50"><button class="button button-full button-small icon-left ion-social-euro button-custom" ng-disabled="!$parent.preis || !$parent.freitext || !$parent.name" ng-click="buyAdFree()">Jetzt Kaufen</button></div>
</div>