title: Use of $rootScope and app.constant in AngularJs
body: <p>I need to set my ralis api-url in angularJs Front-end application which is same for entire application which one is the best solution currently i am using constant.</p>
  
  <pre><code>var app = angular.module('enbakeCRM',[]);
  
  app.constant('apiUrl', 'http://localhost:3000');
  </code></pre>
  
  <blockquote>
    <p><strong>calling inside the controller same as services</strong></p>
  </blockquote>
  
  <pre><code>app.controller('aboutController', function ($scope,apiUrl) {
              console.log(apiUrl);
      });
  </code></pre>