I am getting below errors:

****angularfire.min.js:12 Uncaught ReferenceError: angular is not defined**

** angularfire.min.js:12 Uncaught ReferenceError: angular is not defined**

** ionic.bundle.js:17697 Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:**
** Error: [$injector:modulerr] Failed to instantiate module firebase due to:**
** Error: [$injector:nomod] Module ‘firebase’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.****

while running ionic app in device. I got above error via chrome://inspect.

But app works perfect in web view(ionic serve).

Index.html file:

<!--script src="angular.min.js"></script-->
<!-- Firebase -->
// Initialize Firebase
var config = {
apiKey: "xxxx",
authDomain: "xxxx.firebaseapp.com",
databaseURL: "https://xxxx.firebaseio.com",
storageBucket: "xxxx.appspot.com",


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

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

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

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


var db = null;
angular.module(‘app’, [‘ionic’, ‘app.controllers’, ‘app.routes’, ‘app.directives’,‘app.services’,‘ngCordova’,‘firebase’])

.run(function($ionicPlatform,$cordovaSQLite,$rootScope, $firebaseAuth, $firebase, $window, $ionicLoading,$cordovaGeolocation,$interval) {
$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) {


angular.module(‘app.controllers’, [])

    .controller('mobileCtrl', ['$scope', '$rootScope','$stateParams','SendSMSFactory','VcodeStorageService',// The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope,$rootScope,$stateParams,SendSMSFactory,VcodeStorageService) {

I am not sure, whats wrong over here.
I tried replacing cdn links of angular file, by manually placing them in js folder and changing the link accordingly. But no luck.

other post which had similar issue, their solution was to add angular file in index.html.
But i already have it.

Please help.