Hi,
I’m creating an iPad app, that allows users to view PDF documents. The app has four tabs in one of the tabs the user can go from a list view into a details view and then finally into a read pdf view, in another tab they can go from a details view into a read PDF view. The problem I’m having is that the when I go into the read PDF view in the second tab (this tab shows all the downloaded PDFs) I get sent to the read PDF view in the first tab, which causes the back arrow not to appear.
I’ve created a tab for the downloads section, the first tab is the library view and the second tab is the downloads view.
<ion-tab title="My Downloads" icon="ion-ios7-download" ui-sref="tabs.downloads">
<ion-nav-view name="downloads-tab"></ion-nav-view>
</ion-tab>
My app.js file that defines the routes has separate urls for both of the read PDF views. This is the routes for the view online PDFs:
.state(‘tabs.readfolder’, {
url: “/openfolder:id”,
views: {
‘home-tab’: {
templateUrl: “templates/files-and-folders-view.html”,
controller: “ReadFolderCtrl”
}
}
})
.state('tabs.homeread', {
url: "/read:IdTitle",
views: {
'home-tab': {
templateUrl: "templates/read-document.html",
controller: "ReadDocumentCtrl"
}
}
})
Both of which are using the home-tab, these are the routes for the offline views:
.state(‘tabs.downloads’, {
url: “/MyDownloads”,
views: {
‘downloads-tab’: {
templateUrl: “templates/files-and-folders-view.html”,
controller: ‘MyDownloadsCtrl’
}
}
})
.state('tabs.downloads.offlineread', {
url: "/readoffline:IdTitle",
views: {
'downloads-tab': {
templateUrl: "templates/read-document.html",
controller: "ReadDocumentCtrl"
}
}
})
Both are using the downloads-tab, the only thing in common with between the online view and the offline view is they use the same controller and template files, but the tab they load into should be different, but it’s not.
How can I get the offline view PDF route to load in the same downloads-tab and will this cause the back button to appear so the user can navigate back to their downloaded files.
Thanks
Stephen