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

Html content in tabHeading #32

Open
picolo74 opened this issue Feb 8, 2016 · 8 comments
Open

Html content in tabHeading #32

picolo74 opened this issue Feb 8, 2016 · 8 comments

Comments

@picolo74
Copy link

picolo74 commented Feb 8, 2016

Hi,
If the tabHeading is an html content the content in tabScrollTitle is not rendered because it use tabScope.headingElement.textContent vs innerHTML.

Can you Handle Html ?

@Shemesh
Copy link
Collaborator

Shemesh commented Feb 9, 2016

hi,
have you tried using the "data-tabScrollHeading" attribute? its intention is exactly for a cases like you've described.
"put this on a tab and the value of it will be the text for this tab's tooltip and drop-down item."

does this solve it for you?

@picolo74
Copy link
Author

picolo74 commented Feb 9, 2016

Thanx for your answer, i did not see this atributes.
i tried "data-tabScrollHeading" but :

  • it only affect the tooltip
  • the drop-down item contains uncompiled html

Plus, my heading contgains some logic (ng-if..) based on the tab content. I can't put the code in an attributes.

Do you want a plunker ?

@Shemesh
Copy link
Collaborator

Shemesh commented Feb 9, 2016

yes please, plunkr would be great.

@picolo74
Copy link
Author

picolo74 commented Feb 9, 2016

plunkr : http://plnkr.co/edit/fwFrfYGJkAwezqphog5A?p=preview

I noticed another inconvinient behaviour with data-tabScrollHeading :

i added data-tabScrollHeading on the last tab, if html compile was working, i should add the logic in both the heading and this attribute to have the same text everywhere.

I think that if you want different content in the heading and the toolpit (and maybe the drop-down) , there must be different attributes :

  • data-tabScrollToolTipLabel
  • data-tabScrollDropDownLabel
  • And if you want the same text everywhere, tabScope.headingElement.textContent should use the compiled innerHTML or a specific attr like data-tabScrollHtmlLabel

but i think that data-tabScrollHtmlLabel cannot contains complicated logic. Maybe it should be a flag instead :

data-tabScrollHtmlLabel : true/false to compile the heading or not.

@Shemesh
Copy link
Collaborator

Shemesh commented Feb 10, 2016

see this plunkr, it is based on yours: http://plnkr.co/edit/fiY8qhM5G6aGsZRz25yX?p=preview

as you can see the data-tabScrollHeading does affect the tooltips and the drop-down, and it does have a working binding inside it.

the tooltip and drop-down are showing plain text, they are not intended to show html, their intention is to reflect the text from the tab header.

does this answer your needs?

@picolo74
Copy link
Author

Not, really, in fact my last Tab heading is a plus and only contains a span :

I will remove the dropdown.

Thank you

@Shemesh
Copy link
Collaborator

Shemesh commented Feb 11, 2016

it seems we have the same situation - me too have a plus on the last tab..
that is why you have the data-tabScrollIgnore attribute - if there is 'data-tabScrollIgnore="true"' on a tab than it will not be shown in the drop-down.

p.s. if you want to hide the drop-down you can use show-drop-down.

please read the documentation.

@Shemesh
Copy link
Collaborator

Shemesh commented Feb 21, 2016

hi @picolo74 , @h6784rfg6 ...
i'm not sure how to implement this, any help would be good.

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

No branches or pull requests

2 participants