title: AngularFire - Firebase not defined
body: <p>Trying to use AngularFire for a simple Angular polling test app to store basic objects. I've tried injecting $firebase (which logs an error advising me this is deprecated in favor of $firebaseObject and $fireBaseArray). Injecting either of these results in same issue unchanging. </p>
  
  <p>I've searched around, but most posts I've found refer to bower.json syntax errors or something specific to JShint.  It does not appear to be either of these for me.</p>
  
  <p>Error message</p>
  
  <pre><code>ReferenceError: Firebase is not defined
  </code></pre>
  
  <p>Points to line with...</p>
  
  <pre><code>new Firebase(...)
  </code></pre>
  
  <p>Here's my app code:</p>
  
  <pre><code>angular.module('angPoll', ['ui.router', 'firebase']).
  config(...).
  controller('pollsController', function($scope, pollsData) {
      $scope.pollsList = pollsData.getPolls();
  }).
  service('pollsData', function($firebaseObject){
      console.log($firebaseObject); &lt;-- [verified here that the injection works]
      var fireRef = new Firebase('https://&lt;my-ref-url&gt;.firebaseio-demo.com/');
      var pollsRef, polls;
      pollsRef = $firebaseObject(fireRef.child('polls')).$asArray();
  
      this.clearPolls = clearPolls;
      this.setInitialPolls = setInitialPolls;
      this.getPolls = getPolls;
      myDataRef.set({});
  
      function clearPolls() {
          pollsRef.set({});
      }
  
      function getPolls() {
          pollsRef.on("value", function(snapshot){
              console.log(snapshot.val());
              polls = snapshot.val();
              return polls;
          })
      }
  
      function setInitialPolls() {
          pollsRef.set({
              one: {
                  name: "fantastic poll"
              },
              two: {
                  name: "mediocre poll"
              }
          });
      }
  
      setInitialPolls();
  });
  </code></pre>
  
  <p>My research on this issue already:</p>
  
  <p><a href="https://stackoverflow.com/questions/25021003/firebase-angularfire-error-module-firebase-is-not-available">Firebase, AngularFire Error: Module firebase is not available</a> &lt;-- not my issue, as I've verified with a console.log() that $firebaseObject is being properly injected into the service</p>
  
  <p><a href="https://stackoverflow.com/questions/25021640/angularfire-firebase-is-not-defined">Angularfire &#39;Firebase&#39; is not defined</a> &lt;-- Firebase being defined does not appear to rely on this, especially since this is a method call  I'm attempting to initialize the ref</p>
  
  <p><a href="https://github.com/firebase/angularfire/issues/362" rel="nofollow noreferrer">https://github.com/firebase/angularfire/issues/362</a> &lt;-- for some reason they closed this GH issue attributing it solely to a bower.json syntax error, which I'm pretty sure is not the case for me</p>
  
  <p>I've also seen posts about this breaking for JShint but not in the app itself. My issue is int he functionality of the app itself.</p>
  
  <p>My bower.json in case that ends up mattering:</p>
  
  <pre><code>{
    "name": "MyPoll",
    "version": "0.0.0",
    "authors": [
      "thedig"
    ],
    "license": "MIT",
    "private": true,
    "ignore": [
      "**/.*",
      "node_modules",
      "bower_components",
      "test",
      "tests"
    ],
    "dependencies": {
      "angular": "~1.3.14",
      "angular-ui-router": "~0.2.13",
      "angular-local-storage": "~0.1.5",
      "bootstrap": "~3.3.2",
      "restangular": "~1.4.0",
      "angularfire": "~1.0.0"
    }
  }
  </code></pre>
  
  <p>Angularfire included in index.htm:</p>
  
  <pre><code>&lt;head&gt;
  
    &lt;link rel="stylesheet" type="text/css" href="../bower_components/bootstrap/dist/css/bootstrap.min.css"&gt;
    &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
    &lt;script type="text/javascript" src="../bower_components/angular/angular.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../bower_components/angular-ui-router/release/angular-ui-router.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../bower_components/angular-local-storage/dist/angular-local-storage.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../bower_components/restangular/dist/restangular.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../bower_components/lodash/dist/lodash.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../bower_components/angularfire/dist/angularfire.js"&gt;&lt;/script&gt;
  
    &lt;script type="text/javascript" src="MyPoll.js"&gt;&lt;/script&gt;
  
  
  &lt;/head&gt;
  </code></pre>