Hi Günter,

thx for your answer. Unfortunatelly I can not see how to find out the 
internal name of the current route with this. It seems to be possible, to 
use the Router-Object to find out, whether the current route matches an 
exact RouteInstruction (that includes the full route-name as well as 
routing-parameter).

What I need is the current route-name to find out whether it (partially) 
matches a given name.

Do you have a solution for this?

Wishes,
Manfred

Am Mittwoch, 30. Dezember 2015 12:33:10 UTC+1 schrieb Günter Zöchbauer:
>
>
> http://stackoverflow.com/questions/34479405/angular2-get-current-routes-alias
>
> On Wednesday, December 30, 2015 at 12:27:06 AM UTC+1, Manfred Steyer wrote:
>>
>> Hi,
>>
>> currently, I use the Location-Service to find out, what the current route 
>> is:
>>
>> isActive(path): boolean {
>>     if (path == '') return this.location.path() == '';  
>>     return (this.location.path().startsWith(path));
>> }
>>
>> But I'm looking for a better way of doing so, cause in this case, I'm 
>> working with the url (that might change during development) and not with 
>> the internal route-name.
>>
>> Is there a way to get the name of the current route?
>>
>> Wishes,
>> Manfred
>>
>

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to