title: How to access factory from controller
body: <p>I have a <code>factory</code> like this:</p>
  
  <pre><code>rasm.factory('serviceUrl',[function(){
          function serviceUrl(){
              this.p = location.protocol;
              this.h = getHost();
          }
          serviceUrl.prototype.getServiceUrl = function(){
              return this.p +'//'+ this.h + '/services/'
          }
      }])
  </code></pre>
  
  <p>i have implemented this in javascript object oriented way.this is the resource that i have used
  <a href="https://medium.com/opinionated-angularjs/angular-model-objects-with-javascript-classes-2e6a067c73bc#.du8tor7h2" rel="nofollow">https://medium.com/opinionated-angularjs/angular-model-objects-with-javascript-classes-2e6a067c73bc#.du8tor7h2</a></p>
  
  <p>My problem is, how can I access this <strong>getServiceUrl</strong> function from my controller. is this even possible? thanks guys </p>