diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 4fc6d0b..2b44c2b 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -2,6 +2,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
+import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@@ -25,7 +26,8 @@ import { ControlsComponent } from './components/controls/controls.component';
imports: [
BrowserModule,
AppRoutingModule,
- HttpClientModule
+ HttpClientModule,
+ FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
diff --git a/src/app/components/controls/controls.component.html b/src/app/components/controls/controls.component.html
index 5aa68c2..57f9fb0 100644
--- a/src/app/components/controls/controls.component.html
+++ b/src/app/components/controls/controls.component.html
@@ -1 +1,19 @@
-
controls works!
+
+
+
+ {{ song.result[0].name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/components/controls/controls.component.ts b/src/app/components/controls/controls.component.ts
index 84173c8..bb96977 100644
--- a/src/app/components/controls/controls.component.ts
+++ b/src/app/components/controls/controls.component.ts
@@ -1,4 +1,8 @@
import { Component, OnInit } from '@angular/core';
+import { faPlay, faPause } from '@fortawesome/free-solid-svg-icons';
+import { AudioService } from 'src/app/services/audio.service';
+import { DataService } from 'src/app/services/data.service';
+import { Observable } from 'rxjs';
@Component({
selector: 'app-controls',
@@ -7,9 +11,21 @@ import { Component, OnInit } from '@angular/core';
})
export class ControlsComponent implements OnInit {
- constructor() { }
+ // ? Fontawesome imports
+ faPlay = faPlay;
+ faPause = faPause;
+
+ currentSong: Observable;
+
+ constructor(
+ public audio: AudioService,
+ private data: DataService
+ ) { }
ngOnInit() {
+ this.audio.currentSong.subscribe(id => {
+ this.currentSong = this.data.getSong(id);
+ });
}
}
diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html
index 4122c38..d0fb6cb 100644
--- a/src/app/components/home/home.component.html
+++ b/src/app/components/home/home.component.html
@@ -1 +1,3 @@
-{{ (song | async) | json }}
+
+ {{ song.result[0].name }}
+
diff --git a/src/app/components/home/home.component.ts b/src/app/components/home/home.component.ts
index 60961aa..21233e7 100644
--- a/src/app/components/home/home.component.ts
+++ b/src/app/components/home/home.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { DataService } from 'src/app/services/data.service';
import { Observable } from 'rxjs';
+import { AudioService } from 'src/app/services/audio.service';
@Component({
selector: 'app-home',
@@ -11,7 +12,10 @@ export class HomeComponent implements OnInit {
song: Observable