title: Angularjs cascading dropdowns
body: <p>I need to use angular service to create cascading drop-downs.The commented code I created for testing purpose and it is working fine. I need to create two services to call two methods from the MVC controller : GetCompanies() and GetDocTypes()
  My questions are: Is my first service correct and how can I call the services from the controller?
  Thank you.</p>
  
  <pre><code>/// &lt;reference path="angular.js" /&gt;
  //var myApp = angular
  //    .module("myApp", [])
  //    .controller("companyController", function ($scope, $http) {
  
  //    $http.post('CurrentSettings/GetCompanies')
  //        .then(function (response) {
  //            var response = $.parseJSON(response.data);
  //            $scope.currentSettings = response;
  //        });
  //    });
  
  var myApp = angular.module("myApp", []);
  
  myApp.service('getCompanies', function () {
  $http.post('CurrentSettings/GetCompanies')
  .then(function (response) {
      var response = $.parseJSON(response.data);
      $scope.currentSettings = response;
      });
  });
  
  myApp.controller("companyController", function ($scope, getCompanies,   $http) {
  });
  </code></pre>