Ionic with firebase


i m followieng the above link but i m facing the errors like
ERROR Error: Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
Cannot read property ‘hasOwnProperty’ of undefined
plz any one help me

did you angularfire your project and you check your ionic and firebase version

firebase 1.0 version and i hava angularfire in my project

okey what is wrong i dont understand completely
can you give more info. about your issue

wt i m facing that i give a alert in the login button but wt we are enter the data into the alert then it stored to firebase and after that view into our page in the list

this is my code
app.js
// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// ‘starter’ is the name of this angular module example (also set in a attribute in index.html)
// the 2nd parameter is an array of ‘requires’
// ‘starter.services’ is found in services.js
// ‘starter.controllers’ is found in controllers.js
var app = angular.module(‘starter’, [‘ionic’, ‘firebase’]);
var fb = null;
/var config = {
apiKey: “<API_KEY>”,
authDomain: “<PROJECT_ID>.firebaseapp.com”,
databaseURL: “https://<DATABASE_NAME>.firebaseio.com”,
storageBucket: “.appspot.com”,
messagingSenderId: “<SENDER_ID>”,
};
firebase.initializeApp(config);
/
app.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);

}
if (window.StatusBar) {
  // org.apache.cordova.statusbar required
  StatusBar.styleDefault();
}
  fb = new Firebase("https://mytodos-a9be7.firebaseio.com/");

});
})
app.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state(‘login’, {
url: ‘/login’,
templateUrl: ‘templates/login.html’,
controller: ‘LoginController’
})
.state(‘todo’, {
url: ‘/todo’,
templateUrl: ‘templates/todo.html’,
controller: ‘TodoController’
});
$urlRouterProvider.otherwise(’/login’);
});
app.controller(“LoginController”, function($scope, $firebaseAuth, $location) {

$scope.login = function(/*username, password*/) {
    $location.path("/todo");
   /* var fbAuth = $firebaseAuth(fb);
    fbAuth.$authWithPassword({
        email: username,
        password: password
    }).then(function(authData) {
        $location.path("/todo");
    }).catch(function(error) {
       alert("ERROR " + error);
        console.error("ERROR: " + error);
    });*/
}

$scope.register = function(username, password) {
    var fbAuth = $firebaseAuth(fb);
    fbAuth.$createUser({email: username, password: password}).then(function() {
        return fbAuth.$authWithPassword({
            email: username,
            password: password
        });
    }).then(function(authData) {
        $location.path("/todo");
    }).catch(function(error) {
      alert("ERROR " + error);
       /* console.error("ERROR " + error);*/
    });
}

});
app.controller(“TodoController”, function($scope, $firebaseObject, $ionicPopup) {

$scope.list = function() {
  fbAuth = fb.getAuth();
if(fbAuth) {
    var syncObject = $firebaseObject(fb.child("users/" + fbAuth.uid));
    syncObject.$bindTo($scope, "data");
}

}

$scope.create = function() {
  $ionicPopup.prompt({
    title: 'Enter a new TODO item',
    inputType: 'text'
})
.then(function(result) {
    if(result !== "") {
        if($scope.data.hasOwnProperty("todos") !== true) {
            $scope.data.todos = [];
        }
        $scope.data.todos.push({title: result});
    } else {
        console.log("Action not completed");
    }
});

}

});

index.html

<link rel="manifest" href="manifest.json">

<!-- un-comment this code to enable service worker
<script>
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('service-worker.js')
      .then(() => console.log('service worker installed'))
      .catch(err => console.log('Error', err));
  }
</script>-->

<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">

<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->

<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>

<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
 <script src="js/firebase.js"></script>
  <script src="js/angularfire.min.js"></script>

<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>

I saw your app.js file you can see You have to add firebase config in index.html
Now your app can’t connect your db

you can send e-mail and i can help you at to night bekirbostanci@gmail.com