Well, I need it inside of `app.run` which always returns an empty object. 
Right now I'm just getting $location.path() and running a .split('/') and 
then checking the indices that I "know" will be in those URI namespaces. 
Clugy.

On Tuesday, February 11, 2014 10:59:40 PM UTC-7, Luke Kende wrote:
>
> 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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
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