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;
}
NotificationService:
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" );}
}