var routes = [
{
path: '/',
url: './index.html',
// this will never be called
beforeEnter: function ({ resolve, reject }) {
true ? resolve() : reject()
}
},
{
path: '/profile/',
url: './pages/profile.html',
// this is ok
beforeEnter: function ({ resolve, reject }) {
console.log("beforeEnter called")
true ? resolve() : reject()
}
},
];
i dont know if it’s a bug or feature (need to “investigate” the soucre code)
anyway:
in your case => “my_site/profile”
assuming “BrowserHistory” (ex. “pushState”) + server is configured
the “beforeEnter” func will be called on ‘/profile/’ page
Did you fixed this one? I have exactly the same problem. I tried all I knew, but code under beforeEnter is never executed. Doesnt matter the path, always fails and I have several apps working with this solutions. I think, it is a bug of v6 version