Reformat code
This commit is contained in:
parent
4b10d3d056
commit
093180f5b2
17 changed files with 101 additions and 104 deletions
|
|
@ -4,11 +4,13 @@
|
|||
<button class="navbar-toggler" type="button" (click)="isMenuCollapsed = !isMenuCollapsed">☰</button>
|
||||
<div [ngbCollapse]="isMenuCollapsed" class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
@for (route of routes; track $index;) {
|
||||
@if (route.component !== undefined) {<li class="nav-item">
|
||||
@for (route of routes; track $index; ) {
|
||||
@if (route.component !== undefined) {
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-capitalize" [routerLink]="route.path" routerLinkActive="active"
|
||||
(click)="isMenuCollapsed = true">{{route.path}}</a>
|
||||
</li>}
|
||||
(click)="isMenuCollapsed = true">{{ route.path }}</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {AppComponent} from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {RouterLink, RouterLinkActive, RouterOutlet} from '@angular/router';
|
||||
import {ToastContainerComponent} from '../components/toast-container/toast-container/toast-container.component';
|
||||
import {NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Routes } from '@angular/router';
|
||||
import {Routes} from '@angular/router';
|
||||
import {ShowsComponent} from '../pages/shows/shows.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import { CreateModalComponent } from './create-modal.component';
|
||||
import {CreateModalComponent} from './create-modal.component';
|
||||
|
||||
describe('CreateModalComponent', () => {
|
||||
let component: CreateModalComponent;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import { DeleteModalComponent } from './delete-modal.component';
|
||||
import {DeleteModalComponent} from './delete-modal.component';
|
||||
|
||||
describe('DeleteModalComponent', () => {
|
||||
let component: DeleteModalComponent;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
import {Component, inject} from '@angular/core';
|
||||
import {NgbActiveModal, NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {
|
||||
FormControl,
|
||||
FormGroup,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
Validators
|
||||
} from '@angular/forms';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-delete-modal',
|
||||
|
|
@ -27,7 +21,7 @@ export class DeleteModalComponent {
|
|||
|
||||
constructor() {
|
||||
this.confirmationForm = new FormGroup({
|
||||
name: new FormControl("",Validators.required)
|
||||
name: new FormControl("", Validators.required)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
[header]="toast.header || ''" [autohide]="true" [delay]="toast.delay || 5000"
|
||||
(hidden)="toastService.remove(toast)"
|
||||
[animation]="true" [class]="toast.htmlClass"
|
||||
>{{ toast.body }}</ngb-toast>
|
||||
>{{ toast.body }}
|
||||
</ngb-toast>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import { ToastContainerComponent } from './toast-container.component';
|
||||
import {ToastContainerComponent} from './toast-container.component';
|
||||
|
||||
describe('ToastContainerComponent', () => {
|
||||
let component: ToastContainerComponent;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/// <reference types="@angular/localize" />
|
||||
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { appConfig } from './app/app.config';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import {bootstrapApplication} from '@angular/platform-browser';
|
||||
import {appConfig} from './app/app.config';
|
||||
import {AppComponent} from './app/app.component';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig)
|
||||
.catch((err) => console.error(err));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import { ShowsComponent } from './shows.component';
|
||||
import {ShowsComponent} from './shows.component';
|
||||
|
||||
describe('ShowsComponent', () => {
|
||||
let component: ShowsComponent;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
|
||||
import { ShowsApiService } from './shows-api.service';
|
||||
import {ShowsApiService} from './shows-api.service';
|
||||
|
||||
describe('ShowsApiService', () => {
|
||||
let service: ShowsApiService;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export class ShowsApiService {
|
|||
}
|
||||
|
||||
getShow(id: string): Observable<ShowsApiIdResponse> {
|
||||
return this.http.get<ShowsApiIdResponse>(this.showsEndpoint + "id/" + id )
|
||||
return this.http.get<ShowsApiIdResponse>(this.showsEndpoint + "id/" + id)
|
||||
}
|
||||
|
||||
sendShow(newShow: {}) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
|
||||
import { ToastService } from './toast.service';
|
||||
import {ToastService} from './toast.service';
|
||||
|
||||
describe('ToastService', () => {
|
||||
let service: ToastService;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Toast} from '../../interfaces/toast';
|
||||
|
||||
@Injectable({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue