// #docregion
import { Component } from '@angular/core';
import { UiTabs, UiPane } from './ui_tabs';
class Detail {
title: string;
text: string;
}
@Component({
selector: 'di-demo',
template: `
Tabs Demo
You have {{details.length}} details.
{{detail.text}}
Next last ID is {{id}}.
`,
directives: [UiTabs, UiPane]
})
export class DiDemo {
details: Detail[] = [];
id: number = 0;
addDetail() {
this.id++;
this.details.push({
title: `Detail ${this.id}`,
text: `Some detail text for ${this.id}...`
});
}
removeDetail(detail: Detail) {
this.details = this.details.filter((d) => d !== detail);
}
}