Keeping json id in new link


I am using an ng rpeat to get a list view from my returning json

  <ion-item ng-repeat="category in feeds_categories"
        class="item-thumbnail-left item-icon-right"
    <img class="glow-pic" ng-src="{{category.image}}">
    <p><small>{{category.distance}} Miles</small></p>
    <i class="icon ion-chevron-right"></i>

When I click on the listing it takes takes me to the details page for that listing, I haven’t been able to figure out how to link this details page to the listing id so i can use the other returning json objects to populate this details and have it correspond to the reffering id.

Any help would be greatly appreciated


As you did not show how your app.details state is defined, I’m guessing it could be:

ui-sref="app.details({ id: })"

Or as you did not explain your objects

 .state('app.details', {
url: "/details",
views: {
  'menuContent': {
    templateUrl: "details.html",
    controller: 'DetailsCtrl'


See the :id in url.

.state('app.details', {
    url: "/details/:id",
    views: {
      'menuContent': {
        templateUrl: "details.html",
        controller: 'DetailsCtrl'

May I suggest that you should read angular-ui router docs?


Thank you for the start, I’ll do some more research, haven’t been able to get it working yet. Somewhere on the details page it is not loading in the json for the referring id


@gmarziou They just keep coming :smile:

@lkpttrsn Take a look at this tutorial: It’s a showcase for Master Detail pattern in Ionic, it will also provide a working example. You can also find other tutorials under the Table of Contents.


Thanks! I got it working yesterday. It’s ugly but the dog is hunting, I’ll read over your your materials, appreciate the info.


Great tutorial, nailed it.