samples/without-shell-navigation/router.js
// Determine ID of the section, which should be visible
Determine ID of the section, which should be visible
Determine ID of the section which should be visible
function determineSectionID(path, routes) {
  const CURRENT_ROUTE = routes.find(r => r.path.match(new RegExp(`^\\${path}$`, 'gm'))) || undefined;
  if (CURRENT_ROUTE !== undefined) {
    return CURRENT_ROUTE.id;
  }
  return 'section-not-found';
}
function determineSectionID ( path , routes ) { const CURRENT_ROUTE = routes . find ( r => r . path . match ( new RegExp ( ` \\ ${ path } ` , 'gm' ) ) ) || undefined ; if ( CURRENT_ROUTE !== undefined ) { return CURRENT_ROUTE . id ; } return 'section-not-found' ; }
Determine ID of the section, which should be visible
Determine ID of the section which should be visible
// In case route is unknown, ID for the "Not Found" section is returned