[!!!][TASK] Indexable urls
This commit is contained in:
parent
02e02f9219
commit
81a26b5560
@ -82,10 +82,10 @@ define(['Navigo'], function (Navigo) {
|
||||
}
|
||||
}
|
||||
|
||||
var router = new Navigo(null, true);
|
||||
var router = new Navigo(null, true, '#!');
|
||||
|
||||
router
|
||||
.on(/^\/?#?\/([\w]{2})?\/?(map|graph)?\/?([a-f\d]{12})?([a-f\d\-]{25})?\/?(?:(\d+)\/(-?[\d.]+)\/(-?[\d.]+))?$/, customRoute)
|
||||
.on(/^\/?#?!?\/([\w]{2})?\/?(map|graph)?\/?([a-f\d]{12})?([a-f\d\-]{25})?\/?(?:(\d+)\/(-?[\d.]+)\/(-?[\d.]+))?$/, customRoute)
|
||||
.on({
|
||||
'*': function () {
|
||||
router.fullUrl();
|
||||
@ -93,7 +93,7 @@ define(['Navigo'], function (Navigo) {
|
||||
});
|
||||
|
||||
router.generateLink = function generateLink(data, full, deep) {
|
||||
var result = '#';
|
||||
var result = '#!';
|
||||
|
||||
if (full) {
|
||||
data = Object.assign({}, state, data);
|
||||
@ -119,7 +119,7 @@ define(['Navigo'], function (Navigo) {
|
||||
};
|
||||
|
||||
router.getLang = function getLang() {
|
||||
var lang = location.hash.match(/^\/?#\/([\w]{2})\//);
|
||||
var lang = location.hash.match(/^\/?#!?\/([\w]{2})\//);
|
||||
if (lang) {
|
||||
state.lang = language.getLocale(lang[1]);
|
||||
return lang[1];
|
||||
|
Loading…
Reference in New Issue
Block a user