top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is Constant and Values in Angular.Js?

0 votes
29 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...