Hi, please, help, as deadlines pushing me and I have this headacke with routing
var mainView = null,
myApp = new Framework7({
init: false,
theme: 'md',
language: LANG,
name: $('meta[name="copyright"]').attr('content'),
routes: [
],
view: {
router: true,
reloadPages: true,
allowDuplicateUrls: true,
pushState: true,
pushStateSeparator: '',
pushStateRoot: window.location.protocol + '//' + window.location.hostname + '/',
iosDynamicNavbar: false,
xhrCache: false,
},
on: {
init: function(){
getRoutes(function(routes){
myApp.routes = routes;
mainView = myApp.views.create('.view-main', {
name: 'main',
main: true
});
route(window.location.href);
});
}
},
modal: {
title: $('title').html(),
buttonOk: 'OK',
buttonCancel: 'Отмена',
preloaderTitle: 'Загрузка...',
closeByOutside: true,
},
smartSelect: {
openIn: 'picker',
backText: 'Назад',
popupCloseText: 'Закрыть',
pickerCloseText: 'Выбрать',
searchbar: false,
backOnSelect: true,
},
panel: {
swipe: false,
},
lazy: {
threshold: 50,
sequential: false,
},
sortable: {
moveElements: false
},
notification: {
closeOnClick: true,
closeIcon: false,
closeButtonText: 'Закрыть',
},
touch: {
fastClicks: true
},
statusbar: {
iosOverlaysWebView: true,
scrollTopOnClick: true,
},
upscroller: {
enable: true,
text : 'К началу'
},
panels3d: {
enable: true
},
onready: {
enable: true
},
callback: {
enable: true,
numbers: [
'(063) 756 5555',
'<a id="callback" href="'+BASE+'feedback" class="item-content close-popover"><div class="item-inner"><div class="item-title"><b>Обратная связь</b></div></div></a>'
]
}
});
var $$ = Dom7;
///I use this to navigate
mainView.router.navigate(url, {
pushState: true,
reloadCurrent: true,
ignoreCache: true,
force: true,
});
When any routing happens it makes this changes to state
http://www.dsh.local//uk-UA/contacts/http:/www.dsh.local/uk-UA/products
I tried many different fixes.
P.S. I debugged that I use path like this “/uk-UA/products” to navigate and it 100% corresponds the routes
Routes sample
[{path: “/terms/”, url: “./terms”}, {path: “/terms”, url: “./terms”},…]
I tried urls with Domain (full path), relative with / in the beginning and this type as above ./
What to do?