# Passing parameters to abstract state with tabs

**URL:** <https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936>\
**Category:** ionic-v1\
**Created:** [March 29, 2015, 3:07pm UTC](https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936 "2015-03-29T15:07:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bodiam](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@bodiam](https://forum.ionicframework.com/u/bodiam)\
**Post date:** [March 29, 2015, 3:07pm UTC](https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936/1 "2015-03-29T15:07:46Z")

</div>

Hi all,

A small question here: I have a list view, in which there are item. Whenever I click on an item, a detailed view is opened, which contains some tabs at the top, with some detail information at the bottom.

However, there’s a small issue with my setup, and I can’t figure it out. In the list view, I have urls like: /restaurant/1. The parameter 1 is passed to the tabs and to page below that. This is done with an abstract state and a mapping in the routes, like this:

```
  .state('restaurant', {
  url: "/restaurant",
  abstract: true,
  templateUrl: "templates/restaurant/tabs.html"
})
.state('restaurant.restaurant-tabs', {
url: '/:restaurantId',
views: {
  'restaurant-tabs': {
    templateUrl: 'templates/restaurant/tabs.html',
    controller: 'RestaurantCtrl'
  }
}

```

However, I want to use the :restaurantId in the tabs, because I need it to create links like: #/restaurant/{{[restaurant.id](http://restaurant.id)}}/menu and #/restaurant/{{[restaurant.id](http://restaurant.id)}}/location. This is the problem. In the I can access the restaurant loaded from the controller by using the param. However, in my tabs.html, when I access the restaurant, it’s not defined, and no matter what I try, I can’t get it to work.

If someone can give me a hint, that would be most appreciated. All the code can be found here: [https://github.com/bodiam/ionic-lunch/](https://github.com/bodiam/ionic-lunch/)

Thanks,

Erik

---

<div class="post-metadata">

**Author:** ![rafaelddias](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rafaelddias](https://forum.ionicframework.com/u/rafaelddias)\
**Post date:** [May 14, 2015, 10:22pm UTC](https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936/2 "2015-05-14T22:22:52Z")

</div>

I’m having the same problem… Did you find any solutions?

---

<div class="post-metadata">

**Author:** ![bodiam](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@bodiam](https://forum.ionicframework.com/u/bodiam)\
**Post date:** [May 16, 2015, 4:29pm UTC](https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936/3 "2015-05-16T16:29:05Z")

</div>

No, unfortunately not.

---

<div class="post-metadata">

**Author:** ![aaronksaunders](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aaronksaunders/32/13729_2.png) [@aaronksaunders](https://forum.ionicframework.com/u/aaronksaunders)\
**Post date:** [May 17, 2015, 9:12pm UTC](https://forum.ionicframework.com/t/passing-parameters-to-abstract-state-with-tabs/19936/4 "2015-05-17T21:12:42Z")

</div>

save the state is in service that lets you know what the currently selected restaurant object is? That is my first guess… but with a simpler example I might be able to have a better solution
