From 9e7f6d74af113905a065bb010458eda436505e7e Mon Sep 17 00:00:00 2001 From: Emmanuel Potvin Date: Fri, 4 Dec 2015 22:51:42 -0500 Subject: [PATCH] #5627 Path prefixed with a / only when needed --- modules/angular2/src/router/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/router/router.ts b/modules/angular2/src/router/router.ts index b653a1bbd101..3cfe53e9e091 100644 --- a/modules/angular2/src/router/router.ts +++ b/modules/angular2/src/router/router.ts @@ -435,7 +435,7 @@ export class RootRouter extends Router { commit(instruction: Instruction, _skipLocationChange: boolean = false): Promise { var emitPath = instruction.toUrlPath(); var emitQuery = instruction.toUrlQuery(); - if (emitPath.length > 0) { + if (emitPath.length > 0 && emitPath.substring(0, 1) != '/') { emitPath = '/' + emitPath; } var promise = super.commit(instruction);