如何刷新范围或微风缓存 [英] how to refresh scope or breeze cache
本文介绍了如何刷新范围或微风缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Breeze JS& Angular JS获取作为绑定表的范围sp(ng-repeater)。
Am using to Breeze JS & Angular JS to get the scope sp that am binding table(ng-repeater).
GetPermissionList(): void {
var query = breeze.EntityQuery.from("GetPermissions");
this.dataManager.Query(query).then(
data => {
this.$scope.PermissionsList = <Permission[]>data.results;
}).catch((s) => alert("fail: " + s));
}
我试图添加新记录并在保存更改后重新绑定相同的功能。范围没有得到刷新。
Am trying to add new record and after save changes am rebind same function . scope is not getting refresh.
createItem(item: any): void {
this.dataManager.CreateEntity('Permission', {
NAME: item.Name,
DESCRIPTION: item.Description,
DATE_CREATED: new Date()
});
this.dataManager.SaveChanges();
this.GetPermissionList();
}
因此,新记录不会在页面上刷新。
So that New record is not refreshed on page .
推荐答案
scope.PermissionsList =< Permission []> data.results;
})。 catch ((s)=> alert( 失败: + s));
}
scope.PermissionsList = <Permission[]>data.results; }).catch((s) => alert("fail: " + s)); }
我试图添加新记录并在保存更改后重新绑定相同的功能。范围没有得到刷新。
Am trying to add new record and after save changes am rebind same function . scope is not getting refresh.
createItem(item: any): void {
this.dataManager.CreateEntity('Permission', {
NAME: item.Name,
DESCRIPTION: item.Description,
DATE_CREATED: new Date()
});
this.dataManager.SaveChanges();
this.GetPermissionList();
}
因此,新记录不会在页面上刷新。
So that New record is not refreshed on page .
你可以从中获取帮助这个MSDN的页面
https://msdn.microsoft.com/en-us/library/vstudio/bb738618(v = vs.100).aspx [ ^ ]
you can take help from this page of MSDN
https://msdn.microsoft.com/en-us/library/vstudio/bb738618(v=vs.100).aspx[^]
这篇关于如何刷新范围或微风缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文