In this module, you add two new routes (states) to the application: app.sessions loads the session list view, and app.session loads the session details view.
Open app.js in conference/www/js
Delete the app.playlists state
Replace it with an app.sessions state defined as follows:
.state('app.sessions', {
url: "/sessions",
views: {
'menuContent': {
templateUrl: "templates/sessions.html",
controller: 'SessionsCtrl'
}
}
})
Delete the app.single state
Replace it with an app.session state defined as follows:
.state('app.session', {
url: "/sessions/:sessionId",
views: {
'menuContent': {
templateUrl: "templates/session.html",
controller: 'SessionCtrl'
}
}
});
Modify the fallback route to default to the list of sessions (last line in app.js):
$urlRouterProvider.otherwise('/app/sessions');
Open menu.html in conference/www/templates
Modify the Playlists menu item as follows (modify both the item label and the href):
<ion-item menu-close href="#/app/sessions">
Sessions
</ion-item>
Make sure ionic serve (your local web server) is still running.
If it's not running, open a command prompt, navigate (cd) to the ionic-tutorial directory and type:
ionic serve
In the conference application, open the side menu ("Hamburger" icon in the upper left corner) and select Sessions. Select a session in the list to see the session details.