add pages

This commit is contained in:
Artem
2026-09-29 01:55:20 +03:00
parent cd0543907b
commit 7e8cb26ddd
110 changed files with 7948 additions and 367 deletions
+22 -5
View File
@@ -1,12 +1,29 @@
import { Component, signal } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { Component, computed, inject } from '@angular/core';
import { toSignal } from '@angular/core/rxjs-interop';
import { NavigationEnd, Router, RouterOutlet } from '@angular/router';
import { filter, map, startWith } from 'rxjs';
import { BottomNav } from './layout/bottom-nav/bottom-nav';
@Component({
selector: 'app-root',
imports: [RouterOutlet],
imports: [RouterOutlet, BottomNav],
templateUrl: './app.html',
styleUrl: './app.scss'
styleUrl: './app.scss',
})
export class App {
protected readonly title = signal('maps');
private readonly router = inject(Router);
private readonly url = toSignal(
this.router.events.pipe(
filter((event): event is NavigationEnd => event instanceof NavigationEnd),
map(() => this.router.url),
startWith(this.router.url),
),
{ initialValue: this.router.url },
);
protected readonly hideNav = computed(
() => this.url().startsWith('/items') || this.url().startsWith('/objects'),
);
}