Moved to Angular 16
Moved to FastAPI 0.100.0
Moved to pydantic 2.0
This commit is contained in:
2023-07-22 09:20:01 +05:30
parent 8b2d15b9e1
commit 09b762d154
161 changed files with 693 additions and 753 deletions
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';
import { ActivatedRouteSnapshot, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { Product } from '../../core/product';
@@ -8,8 +8,11 @@ import { ProductService } from '../../product/product.service';
@Injectable({
providedIn: 'root',
})
export class ProductsResolver implements Resolve<Product[]> {
constructor(private ser: ProductService, private router: Router) {}
export class ProductsResolver {
constructor(
private ser: ProductService,
private router: Router,
) {}
resolve(route: ActivatedRouteSnapshot): Observable<Product[]> {
const id = route.paramMap.get('id') as string;
@@ -19,7 +19,7 @@
[class.primary]="!item.hasHappyHour && !item.isNotAvailable"
>
<h3>{{ item.name }}</h3>
<span>{{ item.price | currency : 'INR' }}</span>
<span>{{ item.price | currency: 'INR' }}</span>
</mat-card>
</div>
</mat-card-content>
@@ -12,7 +12,10 @@ import { BillService } from '../bill.service';
export class ProductsComponent implements OnInit {
list: Product[] = [];
constructor(private route: ActivatedRoute, private bs: BillService) {}
constructor(
private route: ActivatedRoute,
private bs: BillService,
) {}
ngOnInit() {
this.route.data.subscribe((value) => {