The idea is that when you click this item, I am taken to a page post.html
I have the following structure
Controller.js
.controller('newsController', ['$http', '$scope', '$rootScope', function ($http, $scope, $rootScope) {
....
$scope.showPost = function (index) {
$rootScope.postContent = $scope.items[index];
$scope.navi.pushPage('post.html'); //this does not work, I want to create something to take me to that page
};
}])
posts.html
<ion-item ng-click="showPost($index)">
<img ng-show="{{ item.thumbnail_images }}" ng-src="{{ item.thumbnail_images.thumbnail.url }}"
class="thumbnail is-loading" img-cache>
<h2> {{ item.title | limitTo: 22 }}...</h2>
<i class="icon ion-ios-pricetag-outline"> <span ng-repeat="cat in item.categories">{{cat.title}} </span> </i>
<p>{{ item.excerpt | htmlToPlaintext | limitTo: 60 }}...</p>
</ion-item>