Angular错误以及注意点

xiaoxiao2021-02-27  434

No ‘Access-Control-Allow-Origin’ header is present on the requested resource

web服务为本地服务时,需要在后台添加header

httpServletResponse.setHeader("Access-Control-Allow-Origin", "*");

angular2 dialog传值bean

let config = new MdDialogConfig(); config.data = this.chooseUser; let dialogRef = this.dialog.open(AddUserComponent, config); constructor(private addUserService: AddUserService, public dialogRef: MdDialogRef<AddUserComponent>) { this.currentSex = 1; this.user = dialogRef._containerInstance.dialogConfig.data; }
转载请注明原文地址: https://www.6miu.com/read-5301.html

最新回复(0)