fix(change detection): preserve memoized results from pure functions

This commit is contained in:
Yegor Jbanov
2015-06-17 12:56:11 -07:00
parent b0e2ebda70
commit 5beaf6d735
5 changed files with 23 additions and 11 deletions

View File

@ -69,12 +69,11 @@ var _rootBindings = [bind(Reflector).toValue(reflector), TestabilityRegistry];
function _injectorBindings(appComponentType): List<Type | Binding | List<any>> {
var bestChangeDetection: Type = DynamicChangeDetection;
// Re-enable once all e2e tests pass
// if (PreGeneratedChangeDetection.isSupported()) {
// bestChangeDetection = PreGeneratedChangeDetection;
//} else if (JitChangeDetection.isSupported()) {
// bestChangeDetection = JitChangeDetection;
//}
if (PreGeneratedChangeDetection.isSupported()) {
bestChangeDetection = PreGeneratedChangeDetection;
} else if (JitChangeDetection.isSupported()) {
bestChangeDetection = JitChangeDetection;
}
return [
bind(DOCUMENT_TOKEN)
.toValue(DOM.defaultDoc()),