page.ts
export function isSessionPage() {
return document.URL.indexOf("/sessions") != -1;
}
export function isRootPage() {
return document.URL.indexOf("/sessions") == -1;
}
export function isSessionDetailPage() {
return document.URL.indexOf("/sessions") != -1 && document.URL.length > 40;
}
export function getSessionDetailsId() {
return document.URL.length > 40 ? document.URL.substring(document.URL.indexOf("/sessions/") + 10) : "";
}