Skip to content

Implemented nsRouterLinkActive directive (angular2 routerLinkActive) #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

ntrp
Copy link
Contributor

@ntrp ntrp commented Jul 11, 2016

The directive works exactly as the angular default one.

Didn't create tests yet but if needed I can look into it maybe. To test it yourself you can just add the directive to some routing links and verify that the class is added (also works on ancestor):

<StackLayout horizzontalAlign="left">
    <Label text="Home" [nsRouterLinkActive]="['selected']" [nsRouterLink]="['/home']"></Label>
    <Label text="Test" [nsRouterLinkActive]="['selected']" [nsRouterLink]="['/test']"></Label>
</StackLayout>

* @internal
*/
constructor(private router: Router, private route: ActivatedRoute) { }
urlTree: UrlTree;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vakrilov
Copy link
Contributor

👍

@vakrilov vakrilov mentioned this pull request Aug 1, 2016
@vakrilov vakrilov merged commit f78b8e8 into NativeScript:master Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants