Storage list in Buys

This commit is contained in:
2016-01-08 01:23:49 +01:00
parent 17c376632d
commit 5b6397ea1a
101 changed files with 2635 additions and 218 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

@@ -8,6 +8,8 @@ angular.module('starter.controllers', [])
$scope.items=[];
$scope.item=[];
$scope.items=$localstorage.getObject('items');
$scope.validate = function() {
var link = 'http://api.raataar.de/rosen/vorschau.php';
@@ -76,18 +78,16 @@ angular.module('starter.controllers', [])
})
.controller('BuysCtrl', function($scope) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//
//$scope.$on('$ionicView.enter', function(e) {
//});
.controller('BuysCtrl', function($scope, $localstorage,$location) {
$scope.items=[];
$scope.items=$localstorage.getObject('items');
$scope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
if ($location.path() == "/tab/buys") {
$scope.items=$localstorage.getObject('items');
}
});
})

View File

@@ -1,16 +1,33 @@
<ion-view view-title="Gekaufte Rosen">
<ion-content>
<ion-list>
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="chat in chats" type="item-text-wrap" href="#/tab/chats/{{chat.id}}">
<img ng-src="{{chat.face}}">
<h2>{{chat.name}}</h2>
<p>{{chat.lastText}}</p>
<i class="icon ion-chevron-right icon-accessory"></i>
<ion-option-button class="button-assertive" ng-click="remove(chat)">
Delete
</ion-option-button>
</ion-item>
</ion-list>
<div style="padding-bottom:15px;">
<div class="item item-divider oswald">Hier können Sie Ihre gekauften Rosen ansehen oder nochmals versenden!</div>
<ul class="list">
<a class="item item-thumbnail-left item-button-right" href="#" ng-repeat="i in items" ng-model="items">
<img src="img/rose1.png">
<h1>{{i.name}}</h1>
<p>{{i.freitext}} </p>
<div class="buttons" style="margin-top:30px;">
<button class="button button-small" >
<i class="icon ion-image"> Vorschau</i>
</button>
<button class="button button-small">
<i class="icon ion-android-share-alt"> Teilen</i>
</button>
</div>
</a>
</ul>
</div>
</ion-content>
</ion-view>