Hi guys … I need help … someone is available? I have a problem with lists and single page … do not pass the parameter … there’s something wrong and do not understand what … thanks… i use ionic 1
.state('app.eventi', {
url: '/eventi',
views: {
'menuContent': {
templateUrl: 'templates/eventi.html',
controller: 'EventiCtrl'
}
}
})
.state('app.evento', {
url: '/evento',
params: {
evento: null
},
views: {
'menuContent': {
templateUrl: 'templates/evento.html',
controller: 'EventoCtrl'
}
}
});
.controller('EventiCtrl', function ($scope, EventiFactory) {
$scope.eventi = [{ }];
EventiFactory.getData().then(function (response) {
$scope.eventi = response.data;
});
$scope.doRefresh = function () {
EventiFactory.getData().then(function (response) {
$scope.eventi = response.data;
})
$scope.$broadcast('scroll.refreshComplete');
$scope.$apply()
};
})
.controller('EventoCtrl', function ($scope, $stateParams) {
$scope.evento = $stateParams.evento;
})