简体   繁体   中英

Ember.js and ArrayController

Looking at ArrayController at the moment I came across two ways of implementing them:

  1. http://awardwinningfjords.com/2011/12/27/emberjs-collections.html
  2. http://trek.github.com

From what I see are the differences mainly in

  • ArrayController.create vs ArrayController.extend
  • In the demo from trek, the data is loaded in the model whereas in the Twitter example it is loaded in the controller.
  • For the option of Twitter, I wonder how to do the routing.

Which one of the twos should one use as a common pattern for that?

Trek的帖子反映了截至2012年9月的最新最佳做法。最好是关注Trek的例子,而不是关于Twitter的博客文章。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM