Thanks,
This is how it’s all defined:
initializeFramework7: function() {
app.f7App = new Framework7({
root: '#app',
// App Name
name: 'Mobile App',
// App id
id: 'com.act.mobile',
// Enable swipe panel
panel: {
swipe: 'left',
},
// Theme
theme: 'ios',
// Add default routes
routes: [
{
name: 'profile',
path: '/profile/',
url: './pages/profile.html',
on: {
pageBeforeIn: function(e, page) {
Profile.getProfile();
}
}
},
{
name: 'settings',
path: '/settings/',
url: './pages/settings.html',
on: {
pageBeforeIn: function(e, page) {
Settings.getProfile();
Settings.populateNewRegistrationId();
}
}
},
{
path:'/notifications/',
url: 'pages/notifications.html',
on: {
pageBeforeIn: function (e, page) {
Notification.showNotifications();
},
}
},
{
path:'/alerts/',
url: 'pages/alerts.html',
on: {
pageBeforeIn: function (e, page) {
Notification.showAlerts();
},
}
},
{
path:'/tasks/',
url: 'pages/tasks.html',
on: {
pageBeforeIn: function (e, page) {
Notification.showTasks();
},
}
},
{
name: 'objectives-list',
path:'/objectives2/',
url: 'pages/objectives-list.html',
on: {
pageBeforeIn: function (e, page) {
Objective.getObjectivesConfiguration();
},
}
},
{
name: 'objective-view',
path: '/objective/:id',
url: 'pages/objectives-view.html',
on: {
pageBeforeIn: function (e, page) {
Objective.getObjective(page.route.params.id);
}
}
},
{
name: 'objectives-add',
path: '/objective-add/',
url: 'pages/objectives-add.html',
on: {
pageBeforeIn: function (e, page) {
Objective.prepareObjectiveView('objectives-add');
},
}
},
{
name: 'recognitions-list',
path:'/recognitions/',
url: 'pages/recognitions-list.html',
on: {
pageBeforeIn: function (e, page) {
Recognition.getRecognitionConfiguration();
},
}
},
{
name: 'recognition-view',
path: '/recognition/:id',
url: 'pages/recognitions-view.html',
on: {
pageBeforeIn: function (e, page) {
Recognition.getRecognition(page.route.params.id);
},
}
},
{
name: 'recognitions-add',
path:'/recognition-add/',
url: 'pages/recognitions-add.html',
},
],
view: {
iosDynamicNavbar: false,
xhrCache: false,
},
photoBrowser: {
type: 'popup',
},
actions: {
convertToPopover: false,
grid: true,
},
touch: {
// enabled for development
disableContextMenu: false
},
version: '1.1'
});
// If we need to use custom DOM library, let's save it to $$ variable:
app.f7Dom = Dom7;
app.f7jQ = $;
// Add view
app.f7View = app.f7App.views.create('.view-main', {
domCache: true,
stackPages: true,
pushState: true,
uniqueHistory: true
});
},
Pages are loaded this way:
<a href="/recognition-add/">
<i class="icon fa fa-plus"> </i>
<div class="fab-text">Add Recognition</div>
</a>