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

@Injectable()

export class ForinneradminService{
// private goals
 private passedId = new BehaviorSubject<number>(0);
//private passedId = new BehaviorSubject<any>([]);
currentId = this.passedId.asObservable();
// goal = this.goals....
constructor() {}

updatedId(currentId){
    console.log('curr array ----'+currentId);
    this.passedId.next(currentId);
    console.log('test ------- '+this.passedId.value);
}
}