title: Storing Comments in firebase using angularjs
body: <p>Here is a form:</p>
  
  <pre><code>&lt;span class="input-label"&gt;Name&lt;/span&gt;
  &lt;input ng-model="name" type="text"&gt;
  &lt;span class="input-label"&gt;Comment&lt;/span&gt;
  &lt;input ng-model="msg" type="text"&gt;
  &lt;button ng-click="addMessage()"&gt;Comment&lt;/button&gt;
  </code></pre>
  
  <p>On firing click event, I call the addMessage() function in the controller:</p>
  
  <pre><code>app.controller('CommentCtrl', ['$scope', '$firebase', function($scope, $firebase){
      var myRootRef = new Firebase("my://app/link");
      $scope.addMessage = function() {
          /*
           * How do I store the name and comment obtained
           * from the form in firebase.
           *
           * set, push does not work at all
          */
          $scope.modal.hide();
      }
  }]);
  </code></pre>