So... why can't just get it from $routeParams?

If there's something non-angular that you need, you can always access the 
window.location object and parse the path your self.



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