Skip to content
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

NbActionComponent or nb-action has no options for href #29

Closed
ghost opened this issue Oct 12, 2017 · 6 comments
Closed

NbActionComponent or nb-action has no options for href #29

ghost opened this issue Oct 12, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 12, 2017

When the NBActions component is used in a module there is no way of setting the onclick event and there href link just stays blank.

                    <nb-actions size="medium pull-right">
                      <nb-action icon="fa fa-download" (click)="handleShowProductBtn(product)"></nb-action>
                        <nb-action icon="nb-gear"></nb-action>
                    </nb-actions>
@ghost ghost changed the title NbActionComponent or nb-action has no options for onclick or href NbActionComponent or nb-action has no options for href Oct 12, 2017
@ghost
Copy link
Author

ghost commented Oct 12, 2017

Sorry, The issue was with my app for on click. I think it would be nice to have the href option. Although I don't think very necessary so this issue can be closed.

@ghost
Copy link
Author

ghost commented Oct 14, 2017

I see this has been tagged enhancement;

Maybe there should also be a way to set the title such that a title is displayed when you hover over the icons.

@nnixaa
Copy link
Collaborator

nnixaa commented Jan 15, 2018

Closing as we decided to not add this logic inside Nebular, as nb-action can accept any content inside which includes a link. And there is not much sense to duplicate routerLInk functionality.

@nnixaa nnixaa closed this as completed Jan 15, 2018
@EatonZ
Copy link

EatonZ commented Jul 8, 2018

@nnixaa I'm running into the same issue and it appears your tip is no longer valid for the current version - any content put inside of the <nb-action> tags does not render at all. I've also tried putting the nb-action inside of an a, but that makes it not render.

So, what's the current advice on making an nb-action link to an external link/href? (Not using router or click events - I basically want a behavior here)

@Tom4U
Copy link
Contributor

Tom4U commented Dec 3, 2018

Closing as we decided to not add this logic inside Nebular, as nb-action can accept any content inside which includes a link. And there is not much sense to duplicate routerLInk functionality.

There is much sense. Of course we could add our own nodes into nb-action, but we would have to recreate everything from scratch for links and badges. This just doesn't makes sense. Better provide a href (use href for a-tag) and link (use routerLink for a-tag) attribute (maybe even with title) as @Input() and use them inside the component's template instead.

If you would provide better DEV docs, I could implement it. But I don't even get start:wp running and my time's short.

@Tom4U
Copy link
Contributor

Tom4U commented Dec 4, 2018

Ok, got it up and running and therefore can provide the changed code:
#1046
@nnixaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants