initial codebase

This commit is contained in:
anweshknayak
2018-05-28 21:01:27 +05:30
commit 5eedfa13bd
136 changed files with 19812 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { Component, OnInit } from '@angular/core';
import { finalize } from 'rxjs/operators';
import { QuoteService } from './quote.service';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
quote: string;
isLoading: boolean;
constructor(private quoteService: QuoteService) { }
ngOnInit() {
this.isLoading = true;
this.quoteService.getRandomQuote({ category: 'dev' })
.pipe(finalize(() => { this.isLoading = false; }))
.subscribe((quote: string) => { this.quote = quote; });
}
}