Save data to Firebase


This is my first topic on the forum :slight_smile: hope someone can point me in the right direction.

I followed the "Custom Code Support / todo " tutorial where he explained how to add content to firebase. I want to extend that tutorial to save multiple values to firebase.

the code look like this:

angular.module('provestore', ['firebase'])

.service('Provestore', ["$firebaseArray", function($firebaseArray){
    var ref = firebase.database().ref().child("provedata");
    var items = $firebaseArray(ref);
    var prove = {
        items : items,
        addItem: function(title, calocation){
                title      : title,
                //calocation : calocation //this does not work
                //calocation : 'calocation' //this work but then value is set
    return prove;


and this, i tried to do the same with the second field but data does not save. i dont get errors in console.

// The following is the constructor function for this page's controller. See
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams, Provestore) {

    $ = {
        'title'         : '',
      //  'calocation'    : ''
    $scope.addItem = function() {


Can someone please point help me or point me in the right direction/tutorial?

Thank you

I got it working :slight_smile:

Problem was with this

$scope.addItem = function() {