Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (serverSidePath.test(loc)) {
var matches = loc.match(serverSidePath);
matches.length && matches.shift();
routeParams = {};
params && params.forEach(function (param, index) {
routeParams[param] = matches[index];
});
_isRouteRendedered = true;
changeRoute(component);
}
} else if (typeof window !== 'undefined') {
riot.route(path, function () {
var _arguments = arguments;
routeParams = {};
params && params.forEach(function (param, index) {
routeParams[param] = _arguments[index];
});
changeRoute(component);
});
riot.route.start(true);
}
})(path, component);
};
function handler(collection, id, action) {
if (!Riot.mixin('peoplelistObservable')) {
Riot.mixin('peoplelistObservable', new PeoplelistObservable());
}
if (currentPage) {
currentPage.unmount(true)
}
var fn = routes[collection || 'home'];
return fn ? fn(id, action) : console.error('no route found : ', collection, id, action);
}
Riot.route(handler);
Riot.route.exec(handler);
function route (decimal, name) {
decimal = decimal || ''
var hash = '' + decimal
if (name) hash += '/' + name
riot.route(hash)
}
import router from './tags/router.tag';
import route from './tags/route.tag';
import approute from './tags/app-router.tag';
import riot from 'riot';
riot.mount('app-routes');
riot.route('user/profile/prateek1');
window.riot=riot;
this.goto = function (evt) {
riot.route('plugins/' + evt.item.name)
}
client.on('dom-ready', function () {
riot.mount('*')
riot.route.start()
riot.route('plugins')
})
function route (decimal, name) {
decimal = decimal || ''
var hash = '' + decimal
if (name) hash += '/' + name
riot.route(hash)
}