From 2b344dbd20777fb1283b3a5bcf35a6ae8d09469d Mon Sep 17 00:00:00 2001 From: Daniel Zimmermann Date: Wed, 8 Jan 2014 19:58:09 +1100 Subject: fix($route): update current route upon $route instantiation This fixes cases where the first ngView is loaded in a template asynchronously (such as through ngInclude), as the service will miss the first event otherwise. Closes #4957 --- src/ngRoute/route.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ngRoute/route.js') diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 34f3f9ec..2db74a02 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -443,6 +443,7 @@ function $RouteProvider(){ } }; + updateRoute(); $rootScope.$on('$locationChangeSuccess', updateRoute); return $route; -- cgit v1.2.3