Ember naming / capitalization convention

后端 未结 1 1484
醉话见心
醉话见心 2020-12-21 12:43

The way I understand it, we are encouraged to name Ember instances lowercase:

App.mailtruck = Em.Object.create({...});

...and classes upper

相关标签:
1条回答
  • 2020-12-21 13:41

    Yes, namespaces are the exception to this rule. As you said, it's lowerCase instances and UpperCase classes. Also Mixins should be named UpperCase, so it's: App.LoggerMixin = Ember.Mixin.create({}); (Thanks @sly7_7 for the catch)

    Further details can be read in the great blog post by the Emberist: http://www.emberist.com/2012/04/09/naming-conventions.html.

    0 讨论(0)
提交回复
热议问题