Create helper for determining if route is the root

This commit is contained in:
Asher
2020-04-01 11:28:09 -05:00
parent 74a0bacdcf
commit 411c61fb02
7 changed files with 15 additions and 14 deletions

View File

@ -359,6 +359,14 @@ export abstract class HttpProvider {
}
return cookies as T
}
/**
* Return true if the route is for the root page. For example /base, /base/,
* or /base/index.html but not /base/path or /base/file.js.
*/
protected isRoot(route: Route): boolean {
return !route.requestPath || route.requestPath === "/index.html"
}
}
/**