Reuse master-detail page template between tabs

Hi guys,

Is it possible to have a details page template that may be called from different tabs and still maintain history? The page displays product details but you can reach it from different tabs by clicking an item on a list. I wouldn’t duplicate the template as it’s bad practice.

(this has been asked in a different topic but it was more complex and noone replied)

Have you ever edit to $stateProvider?

     .state('tabs', {
       url: '/tabs',
       abstract: true,
       templateUrl: 'templates/tabs.html',
     })

     .state('tabs.tab1', {
       url: '/tab1',
       views: {
         'tabs-tab1': {
           templateUrl: 'templates/tab1.html',
         }
       }

     .state('tabs.tab2', {
       url: '/tab2',
       views: {
         'tabs-tab2': {
           templateUrl: 'templates/tab1.html',
         }
       }
     })
})

I understand your topic means “how use to reusable template code between A tab and B tab, archiving the history.”

I want to hear your thought,

Thanks for the answer.

Looking at the code you provided I realize that my question was not clear enough:

I already have the tabs working and they both contain a list. Now, I want a details page that would show up in its corresponding tab when you click any item in any of the lists.
Look at it like a master-detail setup: you have a list of employees and a page with their personal data. In my case there are 2 lists of employees (in 2 tabs) and I want to share the same personal_data page when you click an employee in any list.

Does it make sense now?

(I’ve updated the topic name as well)

Hi, Did you get an answer?

FYI: I’ve posted this question on stackoverflow, as I need to get help on this as well !

Here is my question on stack overflow. In case you have found any solution for this, would you please share ?

Many thanks !