From 63cd873fef3207deef30c7a7ed66f4b8f647dc12 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Thu, 9 Jan 2014 14:19:41 -0500 Subject: fix($location): return '/' for root path in hashbang mode Before this change, on the root of the application, $location.path() would return the empty string. Following this change, it will always return a root of '/'. Closes #5650 Closes #5712 --- src/ng/location.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ng/location.js') diff --git a/src/ng/location.js b/src/ng/location.js index 0a47445f..d193b1ca 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -184,6 +184,10 @@ function LocationHashbangUrl(appBase, hashPrefix) { this.$$compose(); + if (!this.$$path) { + this.$$path = '/'; + } + /* * In Windows, on an anchor node on documents loaded from * the filesystem, the browser will return a pathname -- cgit v1.2.3