title: Firebase: Error: Key content was undefined. Cannot pass undefined in JSON. Use null instead."
body: <p>Trying firebase for the first time. Got the whole thing working in a plunkr here: 
      <a href="http://plnkr.co/3WIrBn" rel="nofollow">http://plnkr.co/3WIrBn</a></p>
  
  <pre><code>var app = angular.module('myApp',['firebase']);
  
  app.factory('chatMessages',["$firebaseArray",function($firebaseArray){
  var ref = new Firebase('https://scanapp.firebaseIO.com/tut');
      return $firebaseArray(ref);
  }]);
  
  
  app.controller('MyController'['$scope','chatMessages',function($scope,chatMessages){
  
  $scope.test = 'hello world';
  $scope.user = "anonymouse";
  $scope.messages = chatMessages;
  
  $scope.addMessage = function(){
      $scope.messages.$add({
          from: $scope.user,
          content: $scope.message
      });
      $scope.message = '';
  };
  
  
  }]);
  </code></pre>
  
  <p>I tried following their tutorials on their site, did their quick start stuff as well as read the docs thoroughly, but I keep getting the error above: </p>
  
  <p>"Error: Key content was undefined. Cannot pass undefined in JSON. Use null instead."</p>
  
  <p>I can get it all working in the above plunk, so I understand the concepts. Then I copied that same code from the plunk, and CDN links to my project, same error. Im using ionic framework for a web-based app. Angular and everything is still working fine,I just get the error when trying to hit the "add" button to run the function.</p>
  
  <p><strong>UPDATE</strong>: It definitely has something to do with inputs. If I set the "from" and "content" key and field as strings rather than bound to $scope, it works: </p>
  
  <pre><code>    $scope.addMessage = function(){
      $scope.messages.$add({
          from: 'test',
          content: 'stuff'
      });
      $scope.message = '';
  };
  </code></pre>
  
  <p>But obviously that isn't useful other than sending the same data over and over again.</p>