feat(router): add support for route links with no leading slash
Closes #4623
This commit is contained in:
@ -254,6 +254,14 @@ export class RouteRegistry {
|
||||
return instruction;
|
||||
}
|
||||
|
||||
public hasRoute(name: string, parentComponent: any): boolean {
|
||||
var componentRecognizer: RouteRecognizer = this._rules.get(parentComponent);
|
||||
if (isBlank(componentRecognizer)) {
|
||||
return false;
|
||||
}
|
||||
return componentRecognizer.hasRoute(name);
|
||||
}
|
||||
|
||||
// if the child includes a redirect like : "/" -> "/something",
|
||||
// we want to honor that redirection when creating the link
|
||||
private _generateRedirects(componentCursor: Type): Instruction {
|
||||
|
Reference in New Issue
Block a user