观察者反应函数不应该改变模型

时间:2014-04-11 08:11:34

标签: dart angular-dart

AngularDart示例中的Chapter_06 当我在Dartium中运行它时,有一些错误:

Observer reaction functions should not change model.
These watch changes were detected: ctrl.allRecipes: [Instance of 'Recipe', Instance of 'Recipe']
cmp.categories: [Appetizers, Salads, Soups, Main Dishes, Side Dishes, Desserts] 
<= [Appetizers, Salads, Soups, Main Dishes, Side Dishes, Desserts]
These observe changes were detected:

STACKTRACE:
#0      RootScope.flush.<anonymous closure> (package:angular/core/scope.dart:554:11)
#1      RootScope.flush (package:angular/core/scope.dart:560:9)
#2      RootScope.flush (package:angular/core/scope.dart:561:7)
#3      RootScope.flush (package:angular/core/scope.dart:561:7)
#4      apply (package:angular/core/scope.dart:262:18)
#5      _rootRun (dart:async/zone.dart:710)
#6      _rootRun (dart:async/zone.dart:711)
#7      _rootRun (dart:async/zone.dart:711)
#8      _ZoneDelegate.run (dart:async/zone.dart:440)
#9      NgZone._finishTurn (package:angular/core/zone.dart:96:21)

如何解决?

0 个答案:

没有答案