angular - Angular 6,HttpClient,检测后端的数据变化
问题描述
我有一个MessageService
这样的:
import { HttpClient, HttpHeaders } from "@angular/common/http";
@Injectable({
providedIn: "root"
})
export class MessageService {
private BASE_URL = "http://10.1.1.190/EDSOData/Messages";
constructor(private http: HttpClient) { }
public update(parameters: Object) {
const httpOptions = {
headers: new HttpHeaders({
"Content-Type": "application/json",
})
};
return this.http.post(this.BASE_URL, parameters, httpOptions);
}
}
update
插入一条消息。如果应用程序有多个同时用户,我如何检测所有用户的更改?
解决方案
推荐阅读
- php - PHP - 元素中带有点的 XML (Laravel)
- pdf - 从数字签名中提取签名者的个人 ID
- php - symfony 3 在不同的实体管理器中将一个实体映射到另一个实体
- java - java中如何使用对象的类变量来识别对象?
- kubernetes - 如何控制对 Kubernetes 中存储类的访问?
- java - 从 Java 将 Highcharts 导出为 SVG
- sql - HIVE :- 如果所有列匹配,则读取最新行
- python - 带有函数返回值的多处理 for 循环
- javascript - 第二次点击后 Redux 表单和反应状态更新
- node.js - 配置服务器以服务于 Vue 应用程序