import { Component } from '@angular/core' ; import { Observable , Observer } from 'rxjs' ; export interface ExampleTab { label : string ; content : string ; } title @ Component ( { selector : 'tab-group-async-example' , templateUrl : 'tab-group-async-example.html' , styleUrls : [ 'tab-group-async-example.css' ] , } ) export class TabGroupAsyncExample { asyncTabs : Observable < ExampleTab [ ] > ; constructor ( ) { this . asyncTabs = Observable . create ( ( observer ) => { setTimeout ( ( ) => { observer . next ( [ { label : 'First' , content : 'Content 1' } , { label : 'Second' , content : 'Content 2' } , { label : 'Third' , content : 'Content 3' } , ] ) ; } , 1000 ) ; } ) ; } }