mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
refactor: create home module
This commit is contained in:
1 parent
b598fedbf8
commit
4a6917c8d2
4 files changed
+48
-23
No files matched your search
@@ -7,7 +7,8 @@ import { VideoPlayerComponent } from './video-player/video-player.component';
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HomeComponent,
|
||||
loadChildren: () =>
|
||||
import('./home/home.module').then((m) => m.HomeModule),
|
||||
},
|
||||
{
|
||||
path: 'iptv',
|
||||
|
||||
+10
-22
@@ -1,29 +1,23 @@
|
||||
import 'reflect-metadata';
|
||||
import '../polyfills';
|
||||
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FilterPipeModule } from 'ngx-filter-pipe';
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
|
||||
// NG Translate
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HomeComponent } from './home/home.component';
|
||||
import { NgxUploaderModule } from 'ngx-uploader';
|
||||
import { VideoPlayerComponent } from './video-player/video-player.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { RecentPlaylistsComponent } from './home/recent-playlists/recent-playlists.component';
|
||||
import { ChannelListContainerComponent } from './channel-list-container/channel-list-container.component';
|
||||
import { FilterPipeModule } from 'ngx-filter-pipe';
|
||||
import { VjsPlayerComponent } from './vjs-player/vjs-player.component';
|
||||
import { UrlUploadComponent } from './home/url-upload/url-upload.component';
|
||||
import { FileUploadComponent } from './home/file-upload/file-upload.component';
|
||||
|
||||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
@@ -34,21 +28,17 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
declarations: [
|
||||
AppComponent,
|
||||
ChannelListContainerComponent,
|
||||
FileUploadComponent,
|
||||
HomeComponent,
|
||||
RecentPlaylistsComponent,
|
||||
VideoPlayerComponent,
|
||||
VjsPlayerComponent,
|
||||
UrlUploadComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
AppRoutingModule,
|
||||
BrowserAnimationsModule,
|
||||
BrowserModule,
|
||||
CommonModule,
|
||||
FilterPipeModule,
|
||||
HttpClientModule,
|
||||
SharedModule,
|
||||
AppRoutingModule,
|
||||
FilterPipeModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
@@ -56,9 +46,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
deps: [HttpClient],
|
||||
},
|
||||
}),
|
||||
NgxUploaderModule,
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SharedModule } from 'app/shared/shared.module';
|
||||
import { HomeComponent } from './home.component';
|
||||
import { FileUploadComponent } from './file-upload/file-upload.component';
|
||||
import { UrlUploadComponent } from './url-upload/url-upload.component';
|
||||
import { RecentPlaylistsComponent } from './recent-playlists/recent-playlists.component';
|
||||
import { HomeRoutingModule } from './home.routing';
|
||||
import { NgxUploaderModule } from 'ngx-uploader';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, HomeRoutingModule, NgxUploaderModule, SharedModule],
|
||||
declarations: [
|
||||
HomeComponent,
|
||||
FileUploadComponent,
|
||||
UrlUploadComponent,
|
||||
RecentPlaylistsComponent,
|
||||
],
|
||||
})
|
||||
export class HomeModule {}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { HomeComponent } from './home.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HomeComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class HomeRoutingModule {}
|
||||
Reference in new issue
Block a user