Liebeszitat Vorschläge eingebaut.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
angular.module('starter.controllers', [])
|
||||
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state) {
|
||||
.controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope, $cordovaFileTransfer,$cordovaFile,$ionicLoading,$state,$http) {
|
||||
|
||||
$scope.preis="";
|
||||
$scope.name="";
|
||||
@@ -37,6 +37,8 @@ angular.module('starter.controllers', [])
|
||||
$scope.showrosen = false;
|
||||
$scope.showflatrate = true;
|
||||
|
||||
$scope.zitat='';
|
||||
|
||||
|
||||
|
||||
$scope.show = function() {
|
||||
@@ -67,10 +69,34 @@ $scope.show = function() {
|
||||
$scope.resetflat = function() {
|
||||
inappbilling.consumePurchase(function(result) {}, function(result) {}, 'rosenflatrate');
|
||||
$rootScope.flatrate=0;
|
||||
$scope.showflatrate = true;
|
||||
$timeout(getProducts, 1000);
|
||||
};
|
||||
|
||||
|
||||
$scope.loadzitat = function() {
|
||||
|
||||
$http({
|
||||
url: 'http://api.raataar.de/sapientia-web/sapientia-zitationic/67557103d3658523fa63ff3dcd46d8ec/zitat',
|
||||
dataType: 'json',
|
||||
method: 'GET',
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
||||
.success(function(response) {
|
||||
$scope.zitat = response;
|
||||
$scope.freitext='"' + response.zitat_text + '"';
|
||||
})
|
||||
.error(function(response) {
|
||||
alert("Fehler! Besteht eine Verbindung zum Internet?");
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Produkt-Details abrufen START
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</label>
|
||||
|
||||
<div
|
||||
<div class="col col-100"><button class="button button-full button-small icon-left ion-android-hangout button-custom" ng-click="loadzitat()">kleine Hilfe?</button>
|
||||
<div class="col col-100"><button class="button button-full button-small icon-left ion-android-hangout button-custom" ng-click="loadzitat()">kleine Hilfe? (Zufallstext)</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-50"><button class="button button-full button-small icon-left ion-image button-custom" ng-click="resetflat()">Reset Flatrate</button></div>
|
||||
<div class="col col-100"><button class="button button-full button-small icon-left ion-image button-custom" ng-click="resetflat()">Reset Flatrate</button></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user