Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
🔨 ✏️ issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanWilhite committed Feb 28, 2019
1 parent 3c5b34f commit 39c0d5d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 4 additions & 0 deletions songhay/projects/client/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpModule } from '@angular/http';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './components/app.component';
Expand All @@ -13,7 +15,9 @@ import { YtComponent } from './components/yt/yt.component';
],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpModule,
YouTubeLibModule
],
providers: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<p>
yt works!
</p>
<div *ngIf="youTubeDataService.isLoading">loading thumbs…</div>
<rx-you-tube-thumbs *ngIf="youTubeDataService.isLoaded" [disableDefaultSort]="false" [thumbsAnimationDuration]="500" [thumbsHeaderLevel]="2" [thumbsTitle]="'songhay tube'" [titleRouterLink]="'/player/video/youtube/uploads/songhay/news'" [youTubeItems]="youTubeItems"></rx-you-tube-thumbs>
21 changes: 15 additions & 6 deletions songhay/projects/client/src/app/components/yt/yt.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import { Component, OnInit } from '@angular/core';
import {
YouTubeItem,
YouTubeDataService
} from '@songhay/player-video-you-tube';

@Component({
selector: 'app-yt',
templateUrl: './yt.component.html',
styleUrls: ['./yt.component.scss']
selector: 'app-yt',
templateUrl: './yt.component.html',
styleUrls: ['./yt.component.scss']
})
export class YtComponent implements OnInit {
youTubeItems: YouTubeItem[];

constructor() { }
constructor(public youTubeDataService: YouTubeDataService) {}

ngOnInit() {
}
ngOnInit() {
this.youTubeDataService.loadChannel('youtube-index-songhay-top-ten');

this.youTubeDataService.channelLoaded.subscribe(json => {
this.youTubeItems = YouTubeDataService.getItems(json);
});
}
}

0 comments on commit 39c0d5d

Please sign in to comment.