【发布时间】:2015-11-07 19:47:08
【问题描述】:
这快把我逼疯了。
我有一个log 过滤器。
angular.module('myApp').filter('log', [function() {
return function(content) {
console.log(content);
return content;
};
}]);
在我的控制器中:
$scope.myValue = 'Test';
在我看来:
{{::myValue | log}}
并且每次调用 $digest 循环时,myValue 都会被记录 2 次,这不应该因为 one-way-data-binding。
我坚持了 3 个小时。我一直试图在 plunker 中复制,但没有成功。 :(
【问题讨论】:
标签: angularjs