Right.  I'm proposing a change to the algorithm.  I'll see what I come up
with and see if anyone is interested in a PR.


On Tue, Mar 4, 2014 at 1:48 AM, Luke Kende <[email protected]> wrote:

> Nope.  That's not how it works... you must specify the routes in order of
> literals first as Sander mentioned, and, as  you found when trying it out.
>  Precedence is given on first rule that matches, not on looking through all
> the rules and guessing what the user wants.
>
>
> On Monday, March 3, 2014 11:46:42 AM UTC-7, Matt Hughes wrote:
>>
>> Well, the router could take that into account, no?  If it has two routes
>> that match and one has a literal and the other has a matcher, the literal
>> should have precedence.
>>
>> On Saturday, March 1, 2014 12:41:18 AM UTC-5, Sander Elias wrote:
>>>
>>> Hi Matt,
>>>
>>> Short answer, No.
>>> Somewhat longer, the /:bar is a 'catch all' construct. How can it know
>>> that you don't want to handle 'baz' as an variable?
>>> In this case it is very obvious, but if your router grows, or is build
>>> more dynamically  that might not be the case.
>>>
>>> Regards
>>> Sander
>>>
>>>
>>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/iJO1LqjbsXI/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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