import { Component, OnInit } from '@angular/core';
import { WpdataService } from '../services/wpdata.service';

@Component({
  selector: 'app-youtube',
  templateUrl: './youtube.page.html',
  styleUrls: ['./youtube.page.scss'],
})
export class YoutubePage implements OnInit {

  ytdata: any;

  constructor(private wpgetdataService: WpdataService) { }

  ngOnInit() {
  }

  ionViewWillEnter() {
    this.wpgetdataService.getAllYoutube().subscribe((data) => {
      this.ytdata = data;
      console.log('load Youtube Data');
      console.log(this.ytdata);
    });
  }
}
