Hello ionics, I’m new in AngularJS and I have a problem when I try to show view of details of posts
I have this “test” json:
[{“titulo”:“Encontrar trabajo después de los 43”,“foto”:"",“autor”:“Francesc”,“id”:“0”,“apellido”:“Ramírez”},{“titulo”:“ultima noticia buena”,“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4739-foto/shot.png",“autor”:"Redacción TNI”,“id”:1,“apellido”:""},{“titulo”:“prueba”,“foto”:"",“autor”:“Redacción TNI”,“id”:2,“apellido”:""},{“titulo”:“COn foto”,“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4733-foto/Boston City Flow.jpg”,“autor”:“organizacion”,“id”:3,“apellido”:""},{“titulo”:“prueba para actualizar yeah”,“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4732-foto/Crisantemo 76.jpg”,“autor”:“Jordi”,“id”:4,“apellido”:“Aguilar”},{“titulo”:“noticia modificable yeah”,“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4730-foto/Boston City Flow.jpg”,“autor”:“redaccion Tecnonews”,“id”:5,“apellido”:""},{“titulo”:“edicion 01234”,“foto”:"",“autor”:“Tecnonews”,“id”:6,“apellido”:""},{“titulo”:“YO”,“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4728-foto/felipe rey leon.jpg”,“autor”:“Tecnonews”,“id”:7,“apellido”:""},{“titulo”:“prueba noticia”,“foto”:"",“autor”:“Redacción TNI”,“id”:8,“apellido”:""},{“titulo”:"&¿PU’BLICA?& |·\/()ñ:ç¬=*¨_-ºª€`´^´{[œ",“foto”:“http://tecnonewstest.ebdsoft.com/files/3-4720-foto/Boston City Flow.jpg”,“autor”:“Redacción TNI”,“id”:9,“apellido”:""}]
and this my controllers, first one the view of POSTS (this run fine):
.controller('NoticiasCtrl', function($scope, $timeout, servicioInformacion) {
$scope.items = [];
servicioInformacion.GetFeed().then(function(items){
$scope.items = items;
});
})
and this, controller view of POST detail (not run fine):
.controller('NoticiaCtrl', ['$scope', '$routeParams', '$http',
function($scope, $routeParams, $http) {
$http.get('$routeParams.itemId').success(function(data) {
$scope.item = data;
});
}]);
Anyone help me please?
Thanks so much in advance!