Ionic Tabs and JSON strange behaviour


Hi there!

I have an ionic app using tabs template, and one of the tabs render json feed (blogs) but just a list with the titels and if tou tap, you go to the full article. Is only one big feed for this section.
The html looks like this:`

				<div id="json" class="list blogCss" ng-repeat="item in data" ng-click="moveToSumary(item)">
					<a class="item item-thumbnail-left noBlank" href="#">
						<div class="item-image">
							<img data-ng-src="{{item.image}}" alt=""/>

						<p>{{item.pubDate | limitTo: 16}}</p>

						<div {{ng-bind-html="item.description | limitTo: 16 " }}></div>


I also have another tab (news) that render a different JSON feed but in the same way.

Everything works well, but if you for example open an blog article and then move in to the news tab, open one, and then come back to blog, go back to the list of all blogs and choose another post the json is not rendered anymore (the template is coming with all the tags but it looks like there is no JSON there)

I know this may be confusing, but i wonder if anyone know something about this issue,

Thank you!


Do you fetch your json data within an $ionicView event block?


I’m not sure what are you trying to say.
The controller for the blog list looks like this :smile:

	.controller('blogCtrl', function ($scope, $http, Chats, $state) {
	$ = [];
		success(function (data, status, headers, config) {
			$ = data.value.items;		

	$scope.moveToSumary = function (item) {
		$state.go('tab.summary', {title: item.title});

and the summary looks like this:

.controller('summaryCtrl', function ($scope, Chats, $state, $http) {
	$scope.isloggedIn = Chats.getLoggedIn();
	var userData = Chats.getProfileData();
	$ = Chats.getspecificBlogData($state.params.title);

	$scope.user = {
		comment: ""
	$scope.commentButtonClicked = function () {
		var url = "";
		url = url + "author=" + + "&email=" + + "&content=" + $scope.user.comment + "&item_id=" + $ + "&state=0";
		url = encodeURI(url);
			success(function (data, status, headers, config) {
				alert("Your comment was successfully submitted.One of our administrators will check it before publishing");
				$scope.user = {
					comment: ""
				buttons: [
						{ text:'OK'},
			}).error(function (data) {
	$scope.loginToComment = function () {



ohh sorry yes… i do that:

At the beginning of the html document i have <ion-view view-title="Blog"> on both the list and the summary.


Or i’ m even thinking of making the page automatically refresh after is opened.Anyone know how can this be implemented is this situation?


I meant this:

$scope.$on('$ionicView.beforeEnter', function () {
  // fetch data here to work around Ionic's view caching


no … i can t see anything like this in the code.