Skip to content

Commit

Permalink
update service
Browse files Browse the repository at this point in the history
  • Loading branch information
ntqdinh-axonivy committed Jul 22, 2024
1 parent 8e844c4 commit a218a31
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 25 additions & 2 deletions marketplace-ui/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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']);
});
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class AddFeedbackDialogComponent {
userFeedback: Signal<Feedback | null> =
this.productFeedbackService.userFeedback;

ngOnInit() {
ngOnInit(): void {
const displayName = this.authService.getDisplayName();
if (displayName) {
this.displayName = displayName;
Expand Down

0 comments on commit a218a31

Please sign in to comment.