From c9c3f718e2564a6cc13f958a777ebb4ba9ce5de5 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 11 Jun 2013 22:15:54 +0100 Subject: docs(ngRoute): clarify when gets updated --- src/ngRoute/routeParams.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ngRoute/routeParams.js') diff --git a/src/ngRoute/routeParams.js b/src/ngRoute/routeParams.js index 0c86e89d..0007e833 100644 --- a/src/ngRoute/routeParams.js +++ b/src/ngRoute/routeParams.js @@ -18,6 +18,10 @@ ngRouteModule.provider('$routeParams', $RouteParamsProvider); * The service guarantees that the identity of the `$routeParams` object will remain unchanged * (but its properties will likely change) even when a route change occurs. * + * Note that the `$routeParams` are only updated *after* a route change completes successfully. + * This means that you cannot rely on `$routeParams` being correct in route resolve functions. + * Instead you can use `$route.current.params` to access the new route's parameters. + * * @example *
  *  // Given:
-- 
cgit v1.2.3