jehoelkh
This commit is contained in:
@@ -1 +0,0 @@
|
||||
<p>create-author works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-author',
|
||||
imports: [],
|
||||
templateUrl: './create-author.html',
|
||||
styleUrl: './create-author.css',
|
||||
})
|
||||
export class CreateAuthor {
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
selector: 'app-create-book',
|
||||
imports: [NzFormModule, NzFlexDirective, ReactiveFormsModule],
|
||||
templateUrl: './create-book.html',
|
||||
styleUrl: './create-book.css',
|
||||
styleUrls: ['./create-book.css'],
|
||||
})
|
||||
export class CreateBook {
|
||||
createBookForm = new FormGroup({
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<p>create-loan works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-loan',
|
||||
imports: [],
|
||||
templateUrl: './create-loan.html',
|
||||
styleUrl: './create-loan.css',
|
||||
})
|
||||
export class CreateLoan {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>create-user works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-user',
|
||||
imports: [],
|
||||
templateUrl: './create-user.html',
|
||||
styleUrl: './create-user.css',
|
||||
})
|
||||
export class CreateUser {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>update-author works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-update-author',
|
||||
imports: [],
|
||||
templateUrl: './update-author.html',
|
||||
styleUrl: './update-author.css',
|
||||
})
|
||||
export class UpdateAuthor {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>update-loan works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-update-loan',
|
||||
imports: [],
|
||||
templateUrl: './update-loan.html',
|
||||
styleUrl: './update-loan.css',
|
||||
})
|
||||
export class UpdateLoan {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>update-user works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-update-user',
|
||||
imports: [],
|
||||
templateUrl: './update-user.html',
|
||||
styleUrl: './update-user.css',
|
||||
})
|
||||
export class UpdateUser {
|
||||
|
||||
}
|
||||
5
src/app/interfaces/book.interfaces.ts
Normal file
5
src/app/interfaces/book.interfaces.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface BookInfo {
|
||||
title: string;
|
||||
releaseYear: number;
|
||||
author: string;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
.book-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 20px;
|
||||
justify-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
<p>book works!</p>
|
||||
<app-create-modal [content]="CreateBookComponent"></app-create-modal>
|
||||
|
||||
<section class="book-grid">
|
||||
@for (book of books; track $index) {
|
||||
<app-book-card [bookInfo]="book"></app-book-card>
|
||||
}
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {BookInfo} from "../../interfaces/book.interfaces";
|
||||
import {BookCard} from "../../components/book-card/book-card";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {CreateModal} from "../../components/create-modal/create-modal";
|
||||
import {CreateBook} from "../../components/create-book/create-book";
|
||||
|
||||
@Component({
|
||||
selector: 'app-book',
|
||||
imports: [],
|
||||
imports: [
|
||||
BookCard,
|
||||
NzModalComponent,
|
||||
CreateModal
|
||||
],
|
||||
templateUrl: './book.html',
|
||||
styleUrl: './book.css',
|
||||
styleUrls: ['./book.css'],
|
||||
})
|
||||
export class Book {
|
||||
CreateBookComponent = CreateBook;
|
||||
|
||||
books: BookInfo[] = [
|
||||
{ title: '1984', author: 'George Orwell', releaseYear: 1949 },
|
||||
{ title: 'Le Seigneur des Anneaux', author: 'J.R.R. Tolkien', releaseYear: 1954 },
|
||||
{ title: 'Dune', author: 'Frank Herbert', releaseYear: 1965 },
|
||||
{ title: 'Fahrenheit 451', author: 'Ray Bradbury', releaseYear: 1953 },
|
||||
{ title: 'Les Misérables', author: 'Victor Hugo', releaseYear: 1862 },
|
||||
{ title: 'Harry Potter à l’école des sorciers', author: 'J.K. Rowling', releaseYear: 1997 },
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user