This is an tab addon for Ember. These tabs are components, so you can add them on your application by installing the addon and calling for the component.
git clone
this repositorynpm install
bower install
All you need to do in order for the addon to display something is add the handlebars to the desired template, like this:
If any of the above templates has a controller created for it, for instance lets say we have the controller/path/template3
if this is the case, the third tab, wich calls for template/path/template3
will automaticaly have this controller assigned to it.
Here's an example
// app/controller/custom/controllername.js
import Ember from 'ember';
export default Ember.Controller.extend({
foo: "bar"
});
With the above code, what would be displayed in the tab would be bar
. This is a very simple example, just to show that the controller
and tab
binding is possible.
attribute | Description |
---|---|
activeTabName | This set the active tab when the component is first rendered on the template |
attribute | Description |
---|---|
label | This sets the tab name above the pane |
name | This sets the tab name, this name must be different for all tabs |
ember server
- Visit your app at http://localhost:4200.