我只是完成這個升級自己的一個小例子項目
https://github.com/toranb/ember-code-camp
回答幾個您的問題直接
1 )不再有connectOutlets噪聲 - 只需將路由映射到一個ember路由類/對象。這種方法BTW(模板/視圖/控制器/路由的所有比賽)基於非常約定
CodeCamp.Router.map(function(match) {
match("/").to("sessions");
match("/session/:session_id").to("session"); //no route needed -ember will apply the context for you
match("/speaker/:speaker_id").to("speaker"); //same as above so long as my handlebars template name matches (speaker for this route)
});
CodeCamp.SessionsRoute = Ember.Route.extend({
setupControllers: function(controller) {
controller.set('content', CodeCamp.Session.find());
}
});
2)你在路由器店裏像這樣
App.YourObject.find()
2 b)您可以提交商店從您的控制器中,像這樣
this.get('store').commit()
3)我的車把東西是與路由相關的幫手除外不變
I remove action helpers defined with <a {{action and used linkTo instead
{{#linkTo 'session' session}}View Session Details{{/linkTo}}
我發現這個相當豐富的內容:http://www.youtube.com/watch?v=4Ed_o3_59ME –
我也做了一個介紹ember.js和新的路由器屏幕截圖的任何人可能試圖學習新的api http://toranbillups.com/blog/archive/2013/01/03/Intro-to-ember-js-and-the-new-router-api/ –