Naming Ember.js files what I want

I used the Ember CLI to create a project structure for my application. In particular, I used ember generate resource account Structure (ignoring parts that are not appropriate):

app
    components
    controllers
    models
        account.js
    routes
        account.js
    templates

In Intellij, when I look at the tabs of open files, I see two different files with a name account.js. Then I have to guess which file is the model or the route, depending on what I want (choosing the wrong half time). I have more files than the ones I mentioned here, all with the same duplication problem. Is there a way to rename an account file to say account-model.js, and is it still plugged in ember? May be a specific question broccoli.js, since the Ember-CLI build tool is by default

In the same vein, I also want to be able to embed my templates in different folders based on my embedded resources and routes. I find it difficult to determine how to visualize these templates as soon as I change the directory structure.

+4
source share
1 answer

For templates, as @torazaburo said, you can split the long file name by path/to/template.

For naming conventions, yes, you can change the default naming convention by specifying your own Resolver to describe the Ember.DefaultResolver API document in detail . It is not that difficult.

IntelliJ , , ( ), , . :

โ†’ IDE โ†’ โ†’ .Tabs โ†’

+3

All Articles