import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Platform} from 'ionic-angular';

/**
 * 用户登录跳转 退出跳转
 */

@Injectable()
export class TabService {
    private tabChangeObserver: any;
    public tabChange: any;

    constructor(private platform: Platform) {
        this.tabChangeObserver = null;
        this.tabChange = Observable.create(observer => {
            this.tabChangeObserver = observer;
        })
    }

    public changeTabInContainerPage(data: object) {
        this.tabChangeObserver.next(data);
    }
}

