title: Uncaught Error: new Firebase failed: First argument must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]"
body: <p>In an AngularJS app, I'm trying to get a firebase reference that does exist and I'm following the suggestions of a similar question here.</p>
  
  <p>Now, I've identified the following line in my controller as the culprit:</p>
  
  <pre><code>var indexRef = new Firebase(refString);
  </code></pre>
  
  <p>it is nestled in a setTimeout() since that seemed to solve another error of undefined. I currently have</p>
  
  <pre><code>refString.replace(/\/|:|#|%|\.|\[|\| ]/g, '');
  </code></pre>
  
  <p>in order to avoid </p>
  
  <blockquote>
    <p>Uncaught Error: new Firebase failed: First argument must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".</p>
  </blockquote>
  
  <p>Here's an instance running live on <a href="https://masuk-additions.herokuapp.com/#/" rel="nofollow">Heroku</a> and here's the <a href="http://plnkr.co/edit/G43dqi8H4dn6d8oXdvyy" rel="nofollow">plnkr.</a></p>