Hi!
I used Modal-in class attached to login-screen to load it as a first page, without accesing index.html
How’s the best way to do it now?
1 Like
Better to call its open method without animation app.loginScreen.open(el, false)
1 Like
Thanks Vladimir for your answer!
Sorry to bother you again. I couldn’t get it load.
I need to force open my login screen inside a function.
I tried all of this with no lucky
// 1)
app.loginScreen.open("/login-screen/",false );
//2)
app.loginScreen.create({url:"./pages/login-test.html"},false );
//3)
app.loginScreen.open("login",false);
//4)
var loginScreen = app.loginScreen.create('.view', {
routes: [{
path: '/login/',
url: './pages/login-test.html',
options: {
animate: false,
},
},
],
});
app.loginScreen.open();
This is my routes.js
var f7_routes = [
{
path: '/login-screen/',
componentUrl: './pages/login-test.html',
},
{
path: '/',
url: './index.html',
on: {
pageAfterIn: function (e, page) {
// do something after page gets into the view
},
pageInit: function (e, page) {
// HELP HERE !!! I SHOULD FORCE OPEN THE LOGIN HERE
}
},
{
path: '(.*)',
url: './404.html',
},
];
app.routes.push( f7_routes);
// Init/Create main view
var mainView = app.views.create('.view-main', {
url: '/',
routes: f7_routes
});
Can you upload a kitchen skin example, with the login as a first page, and If a login is OK, display the home.
Because my previous projects were with v1 and we used “modal-in” attr to login.
Now it’s not available and I couldn’t do it work wit v2. I’m a little upset
I’ve tried everything, even with 2 different views (view-main and view-init) but I can’t remove view-init after I routed to view-main
Thanks! it works fine!