Storage list in Buys
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user