-
Notifications
You must be signed in to change notification settings - Fork 0
feat(pages): Add and configure routing for About and Contact pages #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,40 @@ | |||
| @if (book(); as bookData) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این if خوب نیست
اگه میخوای چیزی رو چک کنی برو کامپوننت پدرش چک کن
| @@ -0,0 +1,125 @@ | |||
| :host { | |||
| display: flex; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این استایل هارو از هم جدا کنین یکم مرتب تر بشه
طبق چیزی که تو داک هست
| standalone: true | ||
| }) | ||
| export class BookDetailComponent{ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
چرا اینطوری از injector استفاده میکنید ؟
| @@ -0,0 +1,114 @@ | |||
| <div class="form-container"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
کامپوننت خیلی خیلی خیلی بزرگه
شکسته بشه
| }); | ||
| } | ||
|
|
||
| ngOnInit(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
هیچکدوم از متد ها accesss modifier ندازه
| export class HeaderComponent { | ||
| searchControl = new FormControl<string | null>(''); | ||
|
|
||
| searchTerm = toSignal(this.searchControl.valueChanges.pipe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access modifer
| @@ -0,0 +1,99 @@ | |||
| .static-page-container { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اینارو مرتب کنید
طبق داک
|
|
||
|
|
||
| constructor(private http: HttpClient) { | ||
| this.loadInitialData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public
| public filteredBooks = computed(()=> { | ||
| const term = this.searchTerm(); | ||
| const books = this.books(); | ||
| if (!term){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item != null
کلا سعی کنید هیچ موقع نرید
truthy چک کنید
همیشه null check
کنید
اگرم سواله براتون چرا سرچ کنید زیاد ممقاله میاد
| } | ||
|
|
||
|
|
||
| searchBooks(term: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access modifier
| @@ -0,0 +1,113 @@ | |||
| import {HttpClient} from '@angular/common/http'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اسم فایل چرا اینه
| public imagePreview = signal<string | null>(null); | ||
| public selectedFile = signal<File | null>(null); | ||
|
|
||
| addBookForm = new FormGroup({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
access modifier
| private route = inject(ActivatedRoute); | ||
| private router = inject(Router); | ||
|
|
||
| constructor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
| private searchEffect = effect(() => { | ||
| const currentTerm = this.searchTerm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effect رو همیشه بهتره تو
constructor
بزنیم تمیز تر میشه
| @@ -0,0 +1,63 @@ | |||
| .static-page-container { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
بر اساس داک مرتب کنیپد
This PR introduces two new static pages to the application:
AboutComponentandContactComponent./aboutand/contactin the main routing configuration.