What is the convention in AngularJS for prefixing providers with $?
Should I prefix all custom services in my own code?
Looks like all things that come with angular have prefixed services, e.g. $http
. Controllers, however, are not prefixed with $
in most articles.
Also, all angular code comes with services named in camelCase
, however I've also seen PascalCase
in many blogs online. Which one is the convention?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…