-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added logging for not-found component (#1358)
- Loading branch information
1 parent
e5f6bc0
commit 6781b33
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 15 additions & 2 deletions
17
src/app/core/view/dynamic-routing/not-found/not-found.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
import { Component } from "@angular/core"; | ||
import { Component, Inject, OnInit } from "@angular/core"; | ||
import { LoggingService } from "../../../logging/logging.service"; | ||
import { LOCATION_TOKEN } from "../../../../utils/di-tokens"; | ||
|
||
@Component({ | ||
selector: "app-not-found", | ||
templateUrl: "./not-found.component.html", | ||
styleUrls: ["./not-found.component.scss"], | ||
}) | ||
export class NotFoundComponent {} | ||
export class NotFoundComponent implements OnInit { | ||
constructor( | ||
private loggingService: LoggingService, | ||
@Inject(LOCATION_TOKEN) private location: Location | ||
) {} | ||
|
||
ngOnInit() { | ||
this.loggingService.warn( | ||
"Could not find component for route: " + this.location.pathname | ||
); | ||
} | ||
} |