title: Migrating to AngularJS: would controllers still have methods like initCreationForm?
body: <p>I have been using Spring Pet Clinic to learn about various aspects of Spring, in particular Spring MVC. There is a variant of this project which uses AngularJS whereas the original project used Thymeleaf. In the original project, there were methods that look like this:</p>
  
  <pre><code> @GetMapping("/owners/{ownerId}/pets/new")
  public String initCreationForm(@PathVariable("ownerId") int ownerId, Map&lt;String, Object&gt; model) {
      Owner owner = this.clinicService.findOwnerById(ownerId);
      Pet pet = new Pet();
      owner.addPet(pet);
      model.put("pet", pet);
      return "pets/createOrUpdatePetForm";
  }
  </code></pre>
  
  <p>I see this in the AngularJS version -- in fact this is taken from the PetResource class of that project. I had imagined that all methods would just return json. So my question is, is this a mistake, something left over from the original project that should have been removed or is it correctly part of the AngularJS project?</p>