Form-Validierung angepasst
This commit is contained in:
@@ -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.
|
||||
-->
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user