import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { AdmindataService} from '../shared/admindata.service';

@Component({
  selector: 'app-inner-admin-pages',
  templateUrl: './inner-admin-pages.component.html',
  styleUrls: ['./inner-admin-pages.component.scss']
})
export class InnerAdminPagesComponent implements OnInit {
  aldata : any;
  incomingValues: any;
  passedArray: any;
  leftTiles : any;
  sentId : any;
 
  constructor(private route: ActivatedRoute, private _data: AdmindataService) { 
    this.incomingValues = [];
    
  }

  ngOnInit() {

  this.route.params.subscribe(res => {
    // console.log(res.id); 
    this.sentId = (res.id);
    // console.log("Sent ID ---- "+this.sentId);
  });
    
  this._data.currentArray.subscribe(res => this.passedArray = res);
  // console.log('passed array ----'+JSON.stringify(this.passedArray));
    this.leftTiles = this.passedArray;
  }

}
