Hello guys,
I have seen other posts like this that indicated that I simply need to verify the name of the pages and the routes but the name of the page is null
My code:
App.js
pageInit: function (page) {
console.log(page, page.name);
userChecker();
footerContent();
}
userChecker part see if exist login session storage if not open login form like:
app.loginScreen.open(’#my-login-screen’, true);
Then use ajax for login.
Route:
import HomePage from ‘…/pages/home.f7’;
import AboutPage from ‘…/pages/about.f7’;
import NotFoundPage from ‘…/pages/404.f7’;var routes = [
{
path: ‘/’,
component: HomePage,
},
{
path: ‘/about/’,
component: AboutPage,
},
{
path: ‘(.*)’,
component: NotFoundPage,
}
];export default routes;
I just started so the code is little.
To overcome the problem at the moment I check name of page if is null like:
if (page.name !== null) {
console.log(page, page.name);
userChecker();
footerContent();
}