Can't navigate between two pages with tabs and side menu


I have a side menu with two pages and each page contains tabs with items that link to the other page.
I made this that does not work and this one that works.

The only difference between them is a div that i have added in the two templates between the ion-view and the ion-tabs.
If i don’t do this, $ionicHistory.isAbstractEle method returns true and block the navigation because tabs and menus are considered 'abstract;.

What is the correct way to make that kind of navigation? Do I make something wrong?