import { Component } from '@angular/core'; import { DataService } from '../core/data.service'; import { DegreePlan } from '../core/models/degree-plan'; @Component({ selector: 'app-degree-planner', templateUrl: './degree-planner.component.html', styleUrls: ['./degree-planner.component.scss'] }) export class DegreePlannerComponent { degreePlans: DegreePlan[]; selectedDegreePlan: number; constructor(private dataService: DataService) { this.dataService.getDegreePlans() .subscribe(data => { this.degreePlans = data; this.selectedDegreePlan = this.degreePlans[0].roadmapId; }); // this.dataService.getDegreePlannerCourseData() // .subscribe((data) => console.log('data: ', data)); } }