1
我開始使用Ember使用ember-rails
與Rails 4.1一起開發。爲什麼我的餘燼路由不被使用?
隨着定義了以下路線:
MyApp.Router.reopen({
rootURL: '/mycontroller/'
})
MyApp.Router.map() ->
this.route('welcome')
當我訪問URL http://mysite/mycontroller/welcome
,該welcome
模板不渲染,但index
之一。
DEBUG: -------------------------------
DEBUG: Ember : 1.8.0
DEBUG: Ember Data : 1.0.0-beta.11
DEBUG: Handlebars : 1.3.0
DEBUG: jQuery : 1.11.1
DEBUG: -------------------------------
Attempting URL transition to/
generated -> route:application Object {fullName: "route:application"} ember.js? body=1:15359
generated -> route:index Object {fullName: "route:index"}
Transition #0: application: calling beforeModel hook
Transition #0: application: calling deserialize hook
Transition #0: application: calling afterModel hook
Transition #0: index: calling beforeModel hook
Transition #0: index: calling deserialize hook
Transition #0: index: calling afterModel hook
Transition #0: Resolved all models on destination route; finalizing transition.
generated -> controller:application Object {fullName: "controller:application"}
Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"}
generated -> controller:index Object {fullName: "controller:index"}
Rendering index with default view <(subclass of Ember.View):ember307> Object {fullName: "view:index"}
Transitioned into 'index'
Transition #0: TRANSITION COMPLETE.
我的路線怎麼不明白?
太棒了。謝謝! – 2014-11-06 16:41:43