import { ActivatedRoute, Params } from '@angular/router'; import { Component, OnInit } from '@angular/core'; import { DataService } from '../core/data.service'; import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-degree-planner', templateUrl: './degree-planner.component.html', styleUrls: ['./degree-planner.component.css'] }) export class DegreePlannerComponent implements OnInit { constructor(private http: HttpClient, private dataService: DataService, private activatedRoute: ActivatedRoute) { } ngOnInit() { this.getCourseData(); } getCourseData(): void { this.dataService.getCourseData() .subscribe((data) => console.log('data: ', data)); } }