-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(action): provide new attributes for link and title #1046
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Tom4U! Thanks a lot for the contribution! Could you please, address the comments.
And probably, to simplify *ngIf
conditions it's better to move icon check to ng-container
. Something like this:
<ng-container *ngIf="icon; else projectedContent">
<a *ngIf="link" ...>...</a>
<a *ngIf="href" ...>...</a>
<a *ngIf="!link && !href" ...>...</a>
</ng-container>
<ng-template #projectedContent>
<ng-content></ng-content>
</ng-template>
...
What do you think?
6715c03
to
2329e59
Compare
Codecov Report
@@ Coverage Diff @@
## master #1046 +/- ##
==========================================
- Coverage 79.52% 78.85% -0.68%
==========================================
Files 202 200 -2
Lines 6243 6073 -170
Branches 495 469 -26
==========================================
- Hits 4965 4789 -176
- Misses 1162 1169 +7
+ Partials 116 115 -1
|
@Tom4U thanks for your contribution! |
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
Provides the ability to use a link and title (if icon is set) for action component:
Using
[routerLink]
withlink
attribute:<nb-action link="/" icon="nb-home" title="Home"></nb-action>
Using
href
for links other than[routerLink]
:<nb-action href="http://somesite.com" icon="nb-paper-plane" title="Some Site"></nb-action>
Closes #814