Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 433 Bytes
import { Component } from "../angular-decorators";
import template from "../templates/my-tabs.html";
@Component("myTabs", { template, transclude: true })
export class MyTabs
{
panes = [];
select(pane)
{
this.panes.forEach(function(pane) { pane.selected = false; });
pane.selected = true;
}
addPane(pane)
{
if (this.panes.length === 0)
{
this.select(pane);
}
this.panes.push(pane);
}
}