我希望breezejs的eagarloading扩展函数在查询breeze的asp.net web api时为我提供简单的json对象,以便我可以在我的 Angular View 中迭代它。就像 {{p.users.projects.projectname}} ..但是当我深入项目内部时得到的结果不是普通的 json
function getUsersPartials() {
return EntityQuery.from('users').expand('projects')
.using(manager).execute()
.to$q(querySucceeded, _queryFailed);
function querySucceeded(data) {
users = data.results;
console.log(users);
log('Retrived [Users Partials] from remote data source ', users.length, true);
return users;
}
}
最佳答案
您可以在查询中使用 .noTracking() 来获取简单的 json 对象
关于javascript - AngularJS 中的急切加载 Expand() 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23507837/