23 | `,
24 | changeDetection: ChangeDetectionStrategy.OnPush,
25 | })
26 | export class SearchCompany {
27 | searchQuery = model('');
28 |
29 | onSearchInput(event: Event) {
30 | const target = event.target as HTMLInputElement;
31 | this.searchQuery.set(target.value);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/app/core/services/theme.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, computed, effect, inject, signal, DOCUMENT } from '@angular/core';
2 | import { CUA_THEME_KEY } from '../../app.constants';
3 |
4 | type Theme = 'light' | 'dark';
5 |
6 | @Injectable({
7 | providedIn: 'root',
8 | })
9 | export class ThemeService {
10 | private document = inject(DOCUMENT);
11 | private darkMode = signal