title: Do AngularJS Controllers ever use more than one action/setup method?
body: <p>Most of the examples of AngularJS controllers that I have seen, usually have a single action method that wires everything up for the view.  On the other hand, in controllers that use the MVC pattern, rather than AngularJS's MVW, there are usually multiple action methods per controller, but this does not appear to be the case with AngularJS.</p>
  
  <p>Granted one can wire into the $scope (or some other object) any number of methods that execute behavior, still this does seem to be the same as MVC's action methods, since they do not automatically accept direct route input.</p>
  
  <p>I'm interested because I'm trying to convert an existing Asp.net MVC app to angular and I'm trying to decide the best organizational breakdown for the controllers.</p>
  
  <p>Are my various assumptions correct? </p>
  
  <p>Do AngularJS Controllers ever use more than one action/setup method?</p>
  
  <p>Are angular controllers ever broken down into individual actions? 
  Or does an angular controller have more or less one action, though the routing and view might be different?</p>
  
  <hr>
  
  <p><strong>Update</strong>:<br>
  Requested Example - AngularJS controller:</p>
  
  <pre><code>myApp.controller('DoubleController', ['$scope', function($scope) {
    $scope.double = function(value) { return value * 2; };
  }]);
  </code></pre>
  
  <p>Asp.Net Controller MVC example:  </p>
  
  <pre><code>public class CardController : Controller
      {
          private readonly IService _service;
  
          public CardController(IService service)
          {
              _service = service;
          }
  
          public ActionResult Index(Guid gameId)
          {
              var model = _service.GenerateCardBuyDisplayModel(gameId);
  
              return View(model);
          }
  
          public ActionResult BuyCards(ExecuteBuyModel input)
          {
              _service.ExecuteBuy(input.GameId, input.CardsToBuy);
  
              return RedirectToAction("Index", "Game", new { id = input.GameId});
          }
      }
  </code></pre>
  
  <p>Ruby on Rails controller example:</p>
  
  <pre><code>class ClientsController &lt; ApplicationController
    # This action uses query string parameters because it gets run
    # by an HTTP GET request, but this does not make any difference
    # to the way in which the parameters are accessed. The URL for
    # this action would look like this in order to list activated
    # clients: /clients?status=activated
    def index
      if params[:status] == "activated"
        @clients = Client.activated
      else
        @clients = Client.inactivated
      end
    end
  
    # This action uses POST parameters. They are most likely coming
    # from an HTML form which the user has submitted. The URL for
    # this RESTful request will be "/clients", and the data will be
    # sent as part of the request body.
    def create
      @client = Client.new(params[:client])
      if @client.save
        redirect_to @client
      else
        # This line overrides the default rendering behavior, which
        # would have been to render the "create" view.
        render "new"
      end
    end
  end
  </code></pre>
  
  <p>If you look at these three examples, the AngularJS has only a single constructor/setup method, while the Asp.net MVC example has a constructor and two action methods  The Ruby of rails example does not even have a visible constructor, simply action methods.  The Asp.net MVC example (or the Ruby on Rails example) is similar to how many actions work in other MVC implementations.  In AngularJS I guess there is only one action/constructor method, where in one would attach any additional behavior.  The Asp.net MVC example on the other hand has both a constructor and two action methods that can both be routed to in different ways. similar to the single AngularJS contrustor/action.  </p>