现在我编写没有上下文的代码,$ scope
app.controller(function(){
// ..
this.list = [];
// what ever work with a list of
this.$digest(); // is not a function, why?
});
之前我
app.controller(function($scope){
// ..
$scope.list = [];
// what ever work with a list of
$scope.$digest();
});
但是我需要这个,它是如何工作的?