Firebase and angularfire


I install firebase and angularfire since bower but I find problem of firebase and angularfire that exists screenshot

code app.js

      var app = angular.module('myApp', ['ui.router','ionic','firebase'])
      .run(function($ionicPlatform) {
        $ionicPlatform.ready(function() {
          if(window.cordova && window.cordova.plugins.Keyboard) {
            // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
            // for form inputs)
            // Don't remove this line unless you know what you are doing. It stops the viewport
            // from snapping when text inputs are focused. Ionic handles this internally for
            // a much nicer keyboard experience.
          if(window.StatusBar) {
      app.config(['$stateProvider','$urlRouterProvider', function($stateProvider,$urlRouterProvider) {
        $stateProvider.state("home",{ url : "/home", templateUrl : "templates/home.html" , controller: "HomeCtrl"});
        $stateProvider.state("Inscription",{ url : "/inscription", templateUrl : "templates/inscription.html" , controller: "InscriCtrl"});
        $stateProvider.state("listmsg",{ url : "/listmsg", templateUrl : "templates/list.html" , controller: "ListCtrl"});
        $stateProvider.state("msg",{ url : "/msg", templateUrl : "templates/msg.html" , controller: "MsgCtrl"});
      app.controller('HomeCtrl', [,'$firebaseSimpleLogin',function($scope,$firebaseSimpleLogin) {
        var firebaseObj = new Firebase("");
        var loginObj = $firebaseSimpleLogin(firebaseObj);
        $scope.SignIn = function(event) {
          event.preventDefault();  // To prevent form refresh
          var username = $;
          var password = $scope.user.password;
          loginObj.$login('password', {
              email: username,
              password: password
            .then(function(user) {
              // Success callback
              console.log('Authentication successful');
            }, function(error) {
              // Failure callback
              console.log('Authentication failure');
      app.controller('InscriCtrl', [function() {
      app.controller('ListCtrl', [function() {
      app.controller('MsgCtrl', [function() {

code index.html

              <!DOCTYPE html>
              <meta charset="utf-8">
              <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
              <link rel="manifest" href="manifest.json">
              <!-- un-comment this code to enable service worker
                if ('serviceWorker' in navigator) {
                    .then(() => console.log('service worker installed'))
                    .catch(err => console.log('Error', err));
              <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
              <link rel="icon" href="">
              <link href="" rel="stylesheet">
              <link href="" rel="stylesheet">
                      <!-- AngularFire -->
              <script src="lib/firebase/firebase.js"></script>
              <script src="lib/angularfire/dist/angularfire.js"></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/" rel="stylesheet">
              <!-- ionic/angularjs js -->
              <script src="lib/ionic/js/ionic.bundle.js"></script>
              <script src="lib/ionic/js/angular-ui/angular-ui-router.js"></script>
              <!-- cordova script (this will be a 404 during development) -->
              <script src="cordova.js"></script>
              <!-- your app's js -->
              <script src="js/app.js" ></script>
            <body ng-app="myApp">
                  <ion-nav-bar class="bar-calm">
                        <button menu-toggle="left" class="button button-icon ion-navicon">
                  <ion-side-menu side="left">
                    <ion-item menu-close ui-sref="home">Acceuil</ion-item>
                    <ion-item menu-close ui-sref="Inscription">Inscription</ion-item>
                    <ion-item menu-close ui-sref="listmsg">Listes Messages</ion-item>
                    <ion-item menu-close ui-sref="msg">Message</ion-item>

help me


Are you still using the legacy firebase ?


@vchauhan yes


Did you try to include the JS file for firebase client?


how to do that, I included in the index page is the page of my project génerale