title: AngularFire - ReferenceError: Firebase not defined
body: <p>I have included the Firebase and AngularFire js files via CDN. I have injected the AngularFire into my app and thereafter injected the $firebaseArray into my controller. Yet for some reason I am still getting the 'Firebase not defined error' in my dev console.</p>
  
  <p>I have looked at the following links:</p>
  
  <p><a href="https://stackoverflow.com/questions/28887033/angularfire-firebase-not-defined">AngularFire - Firebase not defined</a></p>
  
  <p><a href="https://stackoverflow.com/questions/36405435/firebase-error-firebase-is-not-defined">Firebase Error - &quot;FireBase is not defined&quot;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/25021640/angularfire-firebase-is-not-defined">Angularfire &#39;Firebase&#39; is not defined</a></p>
  
  <p><a href="https://stackoverflow.com/questions/37642878/angularfire-uncaught-referenceerror-firebase-is-not-defined">Angularfire Uncaught ReferenceError: Firebase is not defined</a></p>
  
  <p>and none of them addresses my situation. Am I missing something? I am including my code below:</p>
  
  <pre><code>//App
  angular.module("TestApp", ['ngAnimate', 'ui.router', 'ui.bootstrap', 'firebase']);
  
  //Controller
  angular.module('TestApp')
  .controller('DetailsController',['$scope', '$firebaseArray', '$http', function ($scope, $firebaseArray, $http) {
  
      console.log($firebaseArray); // &lt;- verified here that the injection works
      var rootRef = new Firebase("https://&lt;my-ref-url&gt;.firebaseio.com");
  
      //load data from firebase db
      $scope.loadCommunity = function(){
  
          $scope.hasCommunity = true;
          $scope.messages = $firebaseArray(rootRef);
  
      };
  
  }]);
  </code></pre>
  
  <p>and the following is the code I included in the index.html file:</p>
  
  <pre><code>&lt;script src="https://www.gstatic.com/firebasejs/3.0.3/firebase.js"&gt;&lt;/script&gt;
  &lt;script src="https://www.gstatic.com/firebasejs/3.0.3/firebase-app.js"&gt;&lt;/script&gt;
  &lt;script src="https://www.gstatic.com/firebasejs/3.0.3/firebase-auth.js"&gt;&lt;/script&gt;
  &lt;script src="https://www.gstatic.com/firebasejs/3.0.3/firebase-database.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
    // Initialize Firebase
    var config = {
      apiKey: "MY API KEY HERE",
      authDomain: "&lt;my-ref-url&gt;.firebaseapp.com",
      databaseURL: "&lt;my-ref-url&gt;.firebaseio.com",
      storageBucket: "",
    };
    firebase.initializeApp(config);
  &lt;/script&gt;
  
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angularFire/2.0.1/angularfire.min.js"&gt;&lt;/script&gt;
  </code></pre>