Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49176

Uncaught-referenceerror-angular-is-not-defined-angularfire-min-js12-uncaught-r

$
0
0

@rahul202 wrote:

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 -->






<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">

app.js:

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) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}

controller.js:

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.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49176

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>