2

我是 ember 的新手……阅读 ember 指南并尝试同时通过 ember-cli 指南应用相同的知识。

我注意到在涉及到 ES6 解析器时两者之间在逻辑上有一些很大的差距,这给我带来了问题,特别是当我想引用 ApplicationRoute、ApplicationController 等类似的东西时。

我不得不问,为了我自己的理智,如何定义 ApplicationRoute 或 ApplicationController?它们是保存为 application.js 还是 index.js?

4

1 回答 1

3

ApplicationRoute would be saved under app/routes/application.js, ApplicationController would be saved as app/controllers/application.js.

as long as those files export default the proper subclassed Route or Controller, respectively, everything should be fine.

于 2014-06-18T20:10:38.737 回答