mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-05-21 12:01:49 +02:00
Add AppRouter and Components
This commit is contained in:
parent
e78e9da24c
commit
281e8b5211
@ -1,8 +1,13 @@
|
||||
import { EntryListingComponent } from './entry-listing/entry-listing.component';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { SongSearchComponent } from './song-search/song-search.component';
|
||||
|
||||
|
||||
const routes: Routes = [];
|
||||
const routes: Routes = [
|
||||
{path: '', component: EntryListingComponent },
|
||||
{path: 'songs', component: SongSearchComponent}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
|
@ -1,6 +1,11 @@
|
||||
<div>
|
||||
<mat-toolbar color="primary">
|
||||
<mat-toolbar color="primary" class="mat-elevation-z6">
|
||||
<span>KaraoQueue</span>
|
||||
<span> </span>
|
||||
<a mat-button routerLink="/" [routerLinkActive]="['is-active']">Warteschlange</a>
|
||||
<a mat-button routerLink="/songs" [routerLinkActive]="['is-active']">Songs</a>
|
||||
<div class="spacer"></div>
|
||||
<a mat-stroked-button>Login</a>
|
||||
</mat-toolbar>
|
||||
</div>
|
||||
<router-outlet></router-outlet>
|
||||
|
@ -5,18 +5,41 @@ import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MatSliderModule } from '@angular/material/slider';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar'
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { LayoutModule } from '@angular/cdk/layout';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { EntryListingComponent } from './entry-listing/entry-listing.component';
|
||||
import { SongSearchComponent } from './song-search/song-search.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
AppComponent,
|
||||
EntryListingComponent,
|
||||
SongSearchComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
BrowserAnimationsModule,
|
||||
MatSliderModule,
|
||||
MatToolbarModule
|
||||
MatToolbarModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
LayoutModule,
|
||||
MatButtonModule,
|
||||
MatSidenavModule,
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
HttpClientModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
|
@ -0,0 +1 @@
|
||||
<p>entry-listing works!</p>
|
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EntryListingComponent } from './entry-listing.component';
|
||||
|
||||
describe('EntryListingComponent', () => {
|
||||
let component: EntryListingComponent;
|
||||
let fixture: ComponentFixture<EntryListingComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EntryListingComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EntryListingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-entry-listing',
|
||||
templateUrl: './entry-listing.component.html',
|
||||
styleUrls: ['./entry-listing.component.scss']
|
||||
})
|
||||
export class EntryListingComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
<p>song-search works!</p>
|
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SongSearchComponent } from './song-search.component';
|
||||
|
||||
describe('SongSearchComponent', () => {
|
||||
let component: SongSearchComponent;
|
||||
let fixture: ComponentFixture<SongSearchComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SongSearchComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SongSearchComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-song-search',
|
||||
templateUrl: './song-search.component.html',
|
||||
styleUrls: ['./song-search.component.css']
|
||||
})
|
||||
export class SongSearchComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user