angular.module('starter.controllers', []) .controller('DashCtrl', function($scope,$ionicPopup,$http, $database, $timeout,$rootScope) { $scope.preis=""; $scope.name=""; $scope.freitext=""; $scope.items=[]; $scope.item=[]; //db = Database.getDb(); //$scope.items=$localstorage.getObject('items'); $scope.validate = function() { 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; }); }; $scope.loaddata = function() { $scope.items=[]; $database.getAllBuys().then(function (result) { if(result.length>0){ alert("daten da"); for(i=0;i0){ for(i=0;i