I\'m trying to create navigation tabs (taken from Twitter Bootstrap):
-
A lot of the proposed solutions here do not work for any recent Ember version (e.g. views being deprecated). Moreover just using the link-to helper will not solve the issue, as bootstrap expects the active class to be present on the not the !
So I will try to summarize the solutions that do in fact work as of now:
The addon provides a component for this special use case:
Taken from https://stackoverflow.com/a/29939821/5556104
ember-bootstrap provides many components that integrate bootstrap functionality into your ember app, amongst them the nav components:
{{#bs-nav type="tabs"}}
{{#bs-nav-item}}
{{#link-to "foo"}}Foo{{/link-to}}
{{/bs-nav-item}}
{{#bs-nav-item}}
{{#link-to "bar"}}Bar{{/link-to}}
{{/bs-nav-item}}
{{/bs-nav}}
Taken from https://stackoverflow.com/a/38279975/5556104
Somewhat hacky, but should work without any additional addon:
Taken from https://stackoverflow.com/a/23966652/5556104