Firebase and angularfire

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

http://imgur.com/UDjPVYA

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)
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      
            // 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.
            cordova.plugins.Keyboard.disableScroll(true);
          }
          if(window.StatusBar) {
            StatusBar.styleDefault();
          }
        });
      })
      
      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"});
      
        $urlRouterProvider.otherwise("home");
      }]);
      
      
      app.controller('HomeCtrl', [,'$firebaseSimpleLogin',function($scope,$firebaseSimpleLogin) {
      
        var firebaseObj = new Firebase("https://appsfactor-68466.firebaseio.com");
        var loginObj = $firebaseSimpleLogin(firebaseObj);
      
        $scope.SignIn = function(event) {
          event.preventDefault();  // To prevent form refresh
          var username = $scope.user.email;
          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>
          <html>
            <head>
              <meta charset="utf-8">
              <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
              <title></title>
  
              <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>-->
  
              <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
  
              <link rel="icon" href="http://getbootstrap.com/favicon.ico">
              <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">
              <link href="http://getbootstrap.com/examples/signin/signin.css" 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/ionic.app.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>
            </head>
            <body ng-app="myApp">
  
            <ion-side-menus>
  
              <ion-side-menu-content>
  
  
                  <ion-nav-bar class="bar-calm">
                    <ion-nav-buttons>
                        <button menu-toggle="left" class="button button-icon ion-navicon">
  
                        </button>
                    </ion-nav-buttons>
                  </ion-nav-bar>
  
                  <ion-nav-view>
  
                  </ion-nav-view>
  
              </ion-side-menu-content>
  
                  <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>
  
                  </ion-side-menu>
  
              </ion-side-menus>
  
  
  
            </body>
          </html>

help me

Are you still using the legacy firebase ?

1 Like

@vchauhan yes

http://imgur.com/a/j17WE

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