У меня есть простая функция, чтобы получать все уведомления от службы. хотя ut дает мне данную ошибку. я хочу получить все подробности от использования сервиса в angular, который отправляет на. net сервер, работающий в рамках структуры.
manager-home.ts:
clients: client_table[];
cols: any[];
flag: boolean;
notes: notifications_table[];
selectedClient: client_table;
constructor(private noteservice: NotificationService, private router: Router, private generalService: GeneralService, private clientsService: ClientsService, private propertyService: PropertyService, private exptetionService: ExptetionService) { }
ngOnInit() {
this.clientsService.GetClients().subscribe(data => {
this.clients = data;
});
this.noteservice.getAllNotification().subscribe(data => {
this.notes = data;
});
this.flag = false;
}
Служба уведомлений:
export class NotificationService {
constructor(private http: HttpClient) { }
AddNote(note:notifications_table): Observable<any>{
return this.http.post<notifications_table>(BASE_SERVER_URL+'Notifications',note);
}
getAllNotification():Observable<notifications_table[]>{
return this.http.get<notifications_table[]>(BASE_SERVER_URL + "Notifications/GetAllNotification" );}
}