本文介绍了ArrayController和ArrayProxy的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在挖掘EmberJS一天:)。

I've been digging into EmberJS for one day :).

我遵循了几个例子。有些例子使用了ArrayProxy,而其他的则使用了ArrayController。我查看了未知的源代码,并猜测什么... Ember.ArrayController只是扩展Ember.ArrayProxy,但在ArrayController中没有额外的方法或功能。

I've followed several examples. Some examples used ArrayProxy while others used ArrayController. I looked at the unminified source code and..guess what...Ember.ArrayController is simply extending Ember.ArrayProxy, but there's no extra methods or features in ArrayController.

所以我的问题是...我们有两个相同的类?

So..my question is..why do we have two same classes?

推荐答案

两个类之间没有区别。

There is no difference between the two classes.

这是我们所有来自SproutCore 0.9.x,1.x和早期SproutCore 2 betas的人,只是用于名称 ArrayController 我想。如果核心团队决定贬值使ArrayController成为可能的一行代码,我建议使用ArrayProxy: - )

It's for all of us who are coming from SproutCore 0.9.x, 1.x and early SproutCore 2 betas and were just use to the name ArrayController I think. I'd recommend using ArrayProxy in case the core team decides to depreciate the one line of code that makes ArrayController possible :-)

这篇关于ArrayController和ArrayProxy的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 08:34