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

Add CSS class to tab in tabset #766

Closed
ghost opened this issue Jul 21, 2016 · 8 comments
Closed

Add CSS class to tab in tabset #766

ghost opened this issue Jul 21, 2016 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2016

Hi,

I can't find a solution to add a "custom" CSS class to tab in my tabset (I want to align only one tab to the right of stack).

Do you have planned this feature in next releases?

<tab [disabled]="true" [ngClass]="pull-right">
    <template tabHeading>
        TITLE
    </template>
    CONTENT
</tab>

There is another similar issue open #443 regarding the possibility to customize tabset/tab.
Thank you!

@valorkin
Copy link
Member

yeap

@ghost
Copy link
Author

ghost commented Aug 26, 2016

Any update about this issue?

@kaojo
Copy link

kaojo commented Sep 19, 2016

I am looking for same feature.

I want to add a css class dynamically:
[class.bg-info]="tabz.dragOver"

@Confusedfish
Copy link
Contributor

Just spotted kaojo's suggestion which would be better than my pr. Not sure how to implement that though

@Confusedfish
Copy link
Contributor

Having looked into how the [class.classname]="binding" works (fairly sure it's here in the template parser) I can't see it being easy to implement the same behaviour. For now the PR should be enough to allow setting a custom class attribute on the element.

@kaojo
Copy link

kaojo commented Sep 25, 2016

The PR looks solid to me. Maybe add a testcase to it?

I don't know how to upvote (or something simular) the PR since i haven't participated in that yet. I hope it gets approved soon.

jtomaszewski pushed a commit to jtomaszewski/ng2-bootstrap that referenced this issue Oct 22, 2016
fixes valor-software#766, fixes valor-software#842
* chore(package): update typescript to version 2.0.3

https://greenkeeper.io/

* Add customClass property to the Tab directive to make it easy to add class names to the outputted nav-items

* tslint fix

* Clicking on some tabs would sometime result in reloading the application (tested in Chrome). This will probably fix issue valor-software#842 which sounds exactly like the scenario this fixes for me.
Gxerxes pushed a commit to Gxerxes/ng2-bootstrap that referenced this issue Oct 28, 2016
fixes valor-software#766, fixes valor-software#842
* chore(package): update typescript to version 2.0.3

https://greenkeeper.io/

* Add customClass property to the Tab directive to make it easy to add class names to the outputted nav-items

* tslint fix

* Clicking on some tabs would sometime result in reloading the application (tested in Chrome). This will probably fix issue valor-software#842 which sounds exactly like the scenario this fixes for me.
@devfomichov
Copy link

Look here #1698

@valorkin
Copy link
Member

@devfomichov thanks for replying to issues :)

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

4 participants