top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Constant and Values in Angular.Js?

0 votes
409 views
What is Constant and Values in Angular.Js?
posted Feb 13, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

A value is nothing more than a simple injectable value. The value can be a string, number but also a function. Value differs from constant in that value cannot be injected into configurations, but it can be intercepted by decorators

We should use value() to register a service object or function, while we should use constant() for configuration data as you can inject constant() into config function.

answer May 31, 2018 by Puneet Batra
...