28 lines
683 B
TypeScript
28 lines
683 B
TypeScript
import {HttpClient} from "@angular/common/http";
|
|
import {Component, OnInit} from "@angular/core";
|
|
|
|
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
|
|
|
@Component({
|
|
selector: 'sdg',
|
|
templateUrl: 'sdg.component.html',
|
|
styleUrls: ['sdg.component.css']
|
|
})
|
|
export class SdgComponent implements OnInit {
|
|
|
|
public sdgs: any = [];
|
|
|
|
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'SDG'}];
|
|
|
|
constructor(
|
|
private httpClient: HttpClient
|
|
) {}
|
|
|
|
ngOnInit() {
|
|
this.httpClient.get('/assets/vocabulary/sdg.json').subscribe(data => {
|
|
// console.log(data['sdg']);
|
|
this.sdgs = data['sdg'];
|
|
console.log(this.sdgs);
|
|
})
|
|
}
|
|
} |