From a218a31c5001bcf532fd9eb705ed6e431661c7f7 Mon Sep 17 00:00:00 2001 From: Dinh Nguyen Date: Mon, 22 Jul 2024 11:32:22 +0700 Subject: [PATCH] update service --- marketplace-ui/src/app/app.component.ts | 27 +++++++++++++++++-- .../add-feedback-dialog.component.ts | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/marketplace-ui/src/app/app.component.ts b/marketplace-ui/src/app/app.component.ts index 6806884de..aefe258ab 100644 --- a/marketplace-ui/src/app/app.component.ts +++ b/marketplace-ui/src/app/app.component.ts @@ -1,8 +1,14 @@ -import { Component, inject } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; +import { Component, inject, signal } from '@angular/core'; +import { + RouterOutlet, + ActivatedRoute, + Router, + NavigationEnd +} from '@angular/router'; import { FooterComponent } from './shared/components/footer/footer.component'; import { HeaderComponent } from './shared/components/header/header.component'; import { LoadingService } from './core/services/loading/loading.service'; +import { filter } from 'rxjs'; @Component({ selector: 'app-root', @@ -13,4 +19,21 @@ import { LoadingService } from './core/services/loading/loading.service'; }) export class AppComponent { loadingService = inject(LoadingService); + isDesignerViewer = signal(false); + + constructor( + private router: Router, + private route: ActivatedRoute + ) {} + + ngOnInit(): void { + this.router.events + .pipe(filter(event => event instanceof NavigationEnd)) + .subscribe(() => { + this.route.queryParams.subscribe(params => { + console.log(params['ivy-viewer']); + console.log(params['ivy-version']); + }); + }); + } } diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-feedback/product-star-rating-panel/add-feedback-dialog/add-feedback-dialog.component.ts b/marketplace-ui/src/app/modules/product/product-detail/product-detail-feedback/product-star-rating-panel/add-feedback-dialog/add-feedback-dialog.component.ts index 0532a5270..4a68cd411 100644 --- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-feedback/product-star-rating-panel/add-feedback-dialog/add-feedback-dialog.component.ts +++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-feedback/product-star-rating-panel/add-feedback-dialog/add-feedback-dialog.component.ts @@ -40,7 +40,7 @@ export class AddFeedbackDialogComponent { userFeedback: Signal = this.productFeedbackService.userFeedback; - ngOnInit() { + ngOnInit(): void { const displayName = this.authService.getDisplayName(); if (displayName) { this.displayName = displayName;