()
| 34 | guide = signal<GuideItem | undefined>(undefined); |
| 35 | |
| 36 | constructor() { |
| 37 | const _route = inject(ActivatedRoute); |
| 38 | const guideItems = this.guideItems; |
| 39 | |
| 40 | _route.params.subscribe(p => { |
| 41 | const guideItem = guideItems.getItemById(p['id']); |
| 42 | if (guideItem) { |
| 43 | this.guide.set(guideItem); |
| 44 | } |
| 45 | |
| 46 | if (!this.guide()) { |
| 47 | this._router.navigate(['/guides']); |
| 48 | } |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | ngOnInit(): void { |
| 53 | if (this.guide() !== undefined) { |
nothing calls this directly
no test coverage detected