Aber Signale und Methoden?
Beispiel (Verwendung der get-Methode aus Map):
Code: Select all
userStatuses: WritableSignal = signal(new Map([
['Alice', 'offline'],
['Bob', 'online']
]));
⚠️ **ALERT:** Alice is currently offline!
Code: Select all
isAliceOffline = computed(() => {
const status = this.userStatuses().get('Alice');
return status === 'offline';
});
⚠️ **ALERT:** Alice is currently offline!
Mobile version