在Ember.js应用程序中,CamelCase vs snake_case vs dash-s

我找不到任何关于在Ember.js应用程序的不同部分使用CamelCase vs snake_case vs dash-s的明确指导.

建议使用以下哪一种情况,如果我将其替换为另一种情况会产生什么影响?

this.route('favoriteAuthor')
this.route('favorite_author')
this.route('favorite-author')

this.modelFor('favoriteAuthor')
this.modelFor('favorite_author')
this.modelFor('favorite-author')

this.get('store').find('favoriteAuthor')
this.get('store').find('favorite_author')
this.get('store').find('favorite-author')

{{render 'favoriteAuthor'}}
{{render 'favorite_author'}}
{{render 'favorite-author'}}

this.controllerFor('favoriteAuthor')
this.controllerFor('favorite_author')
this.controllerFor('favorite-author')

this.transitionTo('favoriteAuthor')
this.transitionTo('favorite_author')
this.transitionTo('favorite-author')

谢谢,

最佳答案 camelCase-s用于模型,控制器,路由它是javaScript的对流.破折号用于车把助手(在它们也是camelCase之前). snake_case用于post_id … photo_id等参数.

点赞