You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Injectable } from '@angular/core';
import {MqttAdapterService} from './mqtt-adapter.service';
import {Observable} from 'rxjs';
import {filter, map} from 'rxjs/operators';
import {AggregatedName} from './model/aggregated/aggregated-name';
@Injectable({
providedIn: 'root'
})
export class NamesService {
Idee:
import { Injectable } from '@angular/core';
import {MqttAdapterService} from './mqtt-adapter.service';
import {Observable} from 'rxjs';
import {filter, map} from 'rxjs/operators';
import {AggregatedName} from './model/aggregated/aggregated-name';
@Injectable({
providedIn: 'root'
})
export class NamesService {
constructor(private mqtt: MqttAdapterService) { }
public name(mac: string): Observable {
return this.mqtt.aggregatedNamesSubject().pipe(filter( (map, index) => {
return map.get(mac).name;
});
}
public updateName(mac: string, name: string){
this.mqtt.publishName(mac, name);
}
}
The text was updated successfully, but these errors were encountered: