Et Al,

I came up with roughly the solution I was looking for. As some mentioned, " 
why not use '$routeParams' " and I replied that it was an empty object 
literal always -- that's not true. I was using $on('$routeChangeStart', 
...) when I should have been using '$routeChangeSuccess'. I now have:


  app.run(function($rootScope, $routeParams, $route, $location, $http){
    $rootScope.$on('$routeChangeSuccess', function(next, prev){
    ...
...

and I am getting the $routeParams I am looking for.

All the help and insight and time from you guys is much appreciated.

Cheers :)

Cody

On Tuesday, February 11, 2014 3:54:02 PM UTC-7, Cody Carlson wrote:
>
> Hi,
>
> I need to be able to pass a URL pathName to a function and have it return 
> the parameters for that path.
>
> var myPath = '/locations/998/search/recipes';
>
> var paramsObject = someAngularFunction(myPath);
>
> console.log('Params for this path are:', paramsObject);
> => { storeId: '998', category: 'recipes' }
>
> Basically, just as the $routeProvider can parse the URL and pull out the 
> ":storeId" and ":category" parameters, I need a method which can pull these 
> out.
>
> Much appreciation,
>
> Cody
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to