Does Angular's routerLinkActive Work in NS?


Hi All,

I have a tab strip that I’m using for navigation, and I want to highlight the currently active tab by applying an “active” style to it. What’s the best way to do this? I looked at routerLinkActive which is supplied by Angular’s Router module, but either I’m doing something wrong or it just doesn’t work with NativeScript’s routing…

Have any of you used this successfully, or do you have a better (simple!) way of accomplishing this?

Thank you,



The idea is you need to add the nsRouterLinkActive="myActiveClassName" directive to the same tag the [nsRouterLink] is on.

I Googled a nice example and found this egghead video by @wwwalkerrun that explains it nicely in the shortest time possible :slight_smile:


Thanks Eddy!

I had found that video a while back, but I think the issue is that we’re not using the [nsRouterLink] directive; instead we’re using a (tap) event because one of our links is a sign out link which pops up an “Are you sure?” confirmation box instead of routing to a different page.

The developer implemented a more verbose method for highlighting the active page, so I think we’ll stick with that until we get smarter about Angular and NativeScript.

I appreciate your help!



Steve! What are you building?


Hey Jen!

We are building a replacement for our existing mobile app (which, by the way, has a very low rating in the app store…).

If you are an Equifax customer you should see it hit your phone sometime this summer (don’t summer releases do better than spring releases? or is that just for movies?). If you are not an Equifax customer, there’s no better time than now to become one! :smile:


This is super exciting! Look forward to downloading the app. When it’s done, please let us know!


We went live today, but with a different app, not the app I was talking about in this (really old) thread:

Google Play Link

App Store Link