import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';

@Injectable()

export class AdmindataService {
    // private goals
    private passedArray = new BehaviorSubject<any>([]);
    currentArray = this.passedArray.asObservable();
    // goal = this.goals....
    constructor() {}

    updatedArray(currentArray){
        //console.log('curr array ----'+JSON.stringify(currentArray));
        this.passedArray.next(currentArray);
        //console.log('test ------- '+JSON.stringify(this.passedArray));
    }
}