Skip to content

Instantly share code, notes, and snippets.

View gmerabishvili's full-sized avatar

Giorgi Merabishvili gmerabishvili

  • Tbilisi, Georgia
View GitHub Profile
@gmerabishvili
gmerabishvili / Audio player app
Created October 6, 2019 07:56
home.component.html
<div fxFlex fxLayout="column" fxLayoutGap="10px">
<div fxLayout="row wrap">
<!-- loop over the artists list and show the cards -->
<div
*ngFor="let artist of artists$ | async"
fxFlex="25"
fxFlex.md="33"
fxFlex.sm="50"
fxFlex.xs="100"
fxLayout="column">
@gmerabishvili
gmerabishvili / home.component.ts
Created October 5, 2019 20:56
Audio player app
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
error$ = new Subject<string>();
artists$: Observable<Song> = this._apiService.artists$
@gmerabishvili
gmerabishvili / api.service.ts
Last active October 5, 2019 20:46
Audio player app
@Injectable()
export class ApiService {
private artistUrl = 'api/artists';
artists$ = this._http.get<Artist[]>(this.artistUrl)
.pipe(
catchError(this.handleError)
);
constructor(private _http: HttpClient) {}