1
我们正在使用带有角度的微风js。每次我们打电话,我们必须添加$范围的服务器时间使用带角度的breezeJs
。$应用
$scope.SelectSection = function() {
var id = $scope.SectionId;
//SectionId
dataContext.getCategoriesBySectionId(id).then(function(data) {
$scope.Categories = data.results;
$scope.$apply()
});
}
我搜索微风网站后,我发现,我们可以使用角度$ HTTP服务作为一个“Ajax实现”为微风,这应该使我们摆脱$范围。$适用()加入下面的代码
angular.module('app').run(['$http', function ($http) {
var ajax = breeze.config.initializeAdapterInstance('ajax', 'angular');
ajax.setHttp($http); // use the $http instance that Angular injected into your app.
}]);
可惜代码仍然不出来$范围正常工作。$适用()
没有人有任何建议?谢谢
您是否尝试过使用['breeze.angular'](http://www.breezejs.com/documentation/breeze-angular-service)? – PSL 2014-09-28 16:22:44