question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename nzTitle based on the directive

See original GitHub issue

What problem does this feature solve?

Having nz-tooltip, nz-popconfirm and nz-popover on the same component makes some behaviors impossible because both of them use the same input for the title: nzTitle.

This means that if you want to create a button that has a tooltip and a popover on click, you won’t be able to show a tooltip at all.

What does the proposed API look like?

Use nzPopoverTitle, nzPopConfirmTitle and nzTooltipTitle as optional second input, with an implicit setter in order to map these to the effective input value and minimize the impact of this change while providing a way to solve this issue.

I’m not sure these are the only directives that should be modified, but they are the ones I spotted so far.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
avin-kavishcommented, May 18, 2019

This behaviour can already by achieved. I think renaming directives is a breaking change and should not be done especially when it is already working. Check this StackBlitz for a working example

<span nz-popover nzTitle="Popover" nzContent="Content">
    <span nz-tooltip nzTitle="This is a button" >
       <button nz-button nz-popconfirm nzTitle="Are you sure to press this button?" >
          Button
       </button>
    </span>
</span>
1reaction
hulliscommented, Aug 7, 2019

image

🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Renaming Angular Components, Directives and Services ...
You'd be forgiven for thinking there is no easy way to rename Angular components, directives and services. The Angular CLI scaffolds several sibling...
Read more >
NG-ZORRO modal scroll behavior
nzTitle ="Vertically centered modal. dialog". import. Enter to Rename, Shift+Enter to Preview. Compiling application & starting dev server…
Read more >
ng-zorro-antd
An enterprise-class UI design system for Angular applications. 60+ high-quality Angular components out of the box. Written in TypeScript with predictable static ...
Read more >
Renaming Angular directives such as *ngFor or custom ...
Yes, that's possible. You can create your own directives that can extend core directives. For example, in order to use *for directive ......
Read more >
Print Untitled (1 page)
The Chief of General Staff's Directive 4/92 issued 15 Dec 92 spells it out. In ... His suggestion that the RNZAOC Newsletter be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found