changes on app module and routing

This commit is contained in:
X4Lo committed 2024-03-31 04:15:20 +00:00
1 parent 56bdbee43d
commit b1820521bc
17 files changed
+132 -387

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './features/pages/home/home.component';
import { SearchComponent } from './features/pages/search/search.component';
import { TrendingComponent } from './features/pages/trending/trending.component';
import { PopularComponent } from './features/pages/popular/popular.component';
const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'search', component: SearchComponent },
{ path: 'popular', component: PopularComponent },
{ path: 'trending', component: TrendingComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
View File
Whitespace-only changes.
+11
View File
@@ -0,0 +1,11 @@
<app-navbar></app-navbar>
<app-sidebar></app-sidebar>
<main class="main-wrapper">
<div class="main-content">
<router-outlet></router-outlet>
</div>
</main>
<script>
$(".data-attributes span").peity("donut")
</script>
+29
View File
@@ -0,0 +1,29 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have the 'ShowZ' title`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('ShowZ');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, ShowZ');
});
});
+10
View File
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'ShowZ';
}
+38
View File
@@ -0,0 +1,38 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule } from '@angular/forms';
import { EntryListComponent } from './features/lists/entry-list/entry-list.component';
import { HomeComponent } from './features/pages/home/home.component';
import { SidebarComponent } from './core/components/sidebar/sidebar.component';
import { NavbarComponent } from './core/components/navbar/navbar.component';
import { PopularComponent } from './features/pages/popular/popular.component';
import { TrendingComponent } from './features/pages/trending/trending.component';
import { SearchComponent } from './features/pages/search/search.component';
import { MainCardComponent } from './features/cards/main-card/main-card.component';
@NgModule({
declarations: [
AppComponent,
EntryListComponent,
HomeComponent,
SidebarComponent,
NavbarComponent,
PopularComponent,
TrendingComponent,
SearchComponent,
MainCardComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
ReactiveFormsModule,
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
+11
View File
@@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
@NgModule({
declarations: [],
imports: [
CommonModule, // Common module for common directives
],
exports: [],
})
export class SharedModule {}