O'Reilly logo
  • Patrick S thinks this is interesting:

Why would you use a constant method over a value method? The main consideration is whether you need to allow the values to be modified or overwritten by a consumer of your service. If so, use the value method; this way, consumers of your service can override the values using an AngularJS decorator. If you do not intend the values to be modified, then use the constant definition. Also, if you need to use the value service inside a module's config method, use the constant method.

Another good use for the value method is to def...


Cover of AngularJS Services


constant Vs value Methods