Ember Routes vs Controllers vs Views

后端 未结 2 671
旧巷少年郎
旧巷少年郎 2021-01-31 02:49

I have read most of the beginner guides on the Ember.js site but I am still confused about the correct place to put stuff.

  1. Route - from online

2条回答
  •  青春惊慌失措
    2021-01-31 03:47

    I think ember2.0 meant to abandon view and controllers, it wants to make your codes more reusable and that's why components are more welcome. For the benefit of putting actions in route instead of controllers, I can only see that it ease the understanding of ember for new users. You can't need to spend a massive time on trying to understand the relationship between controller, route, router, view and template anymore. That's my guess though.

提交回复
热议问题