truly-ui
Version:
Web Components for Desktop Applications.
20 lines (15 loc) • 487 B
text/typescript
import { Component } from '@angular/core';
import { GithubAPIService } from "../shared/services/githubapi";
({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent {
private lastRelease;
constructor( private githubService : GithubAPIService ) {
this.githubService.getReleases().subscribe( (releases => {
this.lastRelease = JSON.parse( releases[ '_body' ] )[ 0 ];
}) );
}
}