title: AngularJS Uncaught ReferenceError: controller is not defined
body: <p>I'm trying to prepare the infrastructure needed to record the data in base using Web Api... And my question is why is getting this error:</p>
  
  <blockquote>
    <p>ReferenceError: WebApi is not defined<br>
        at Scope.$scope.salvar (Controller.js:22)<br>
        at fn (eval at compile (angular.js:15500), :4:138)<br>
        at callback (angular.js:27285)<br>
        at Scope.$eval (angular.js:18372)<br>
        at Scope.$apply (angular.js:18472)<br>
        at HTMLButtonElement. (angular.js:27290)<br>
        at HTMLButtonElement.dispatch (jquery-3.2.1.js:5206)<br>
        at HTMLButtonElement.elemData.handle (jquery-3.2.1.js:5014)  </p>
  </blockquote>
  
  <p>My code is:</p>
  
  <p>Controller.js</p>
  
  <pre><code>prontuariogestanteapp.controller("ProntuariogCtrl", ["$scope", "CalculadorIMC", "WebApi", function ($scope, calculadorIMC, WebApi) 
  {
      $scope.tabs = [
          { Title: "Dados Básicos", PageToDisplay: "./Html/Dados_Basicos.html" },
          { Title: "1º Mês", PageToDisplay: "./Html/Mes_1.html" },
          { Title: "2º Mês", PageToDisplay: "./Html/Mes_2.html" },
          { Title: "3º Mês", PageToDisplay: "./Html/Mes_3.html" },
          { Title: "4º Mês", PageToDisplay: "./Html/Mes_4.html" },
          { Title: "5º Mês", PageToDisplay: "./Html/Mes_5.html" },
          { Title: "6º Mês", PageToDisplay: "./Html/Mes_6.html" },
          { Title: "7º Mês", PageToDisplay: "./Html/Mes_7.html" },
          { Title: "8º Mês", PageToDisplay: "./Html/Mes_8.html" },
          { Title: "9º Mês", PageToDisplay: "./Html/Mes_9.html" },
          { Title: "Pós-Parto", PageToDisplay: "./Html/Mes10_Pos_Parto.html" }
      ];
  
      $scope.salvar = function()
      {
          WebApi.salvar($scope.Mes1);
      };
  }
  </code></pre>