Whenever I attempt to execute this code, I encounter errors. Below is the code followed by the error message:
index.html:
<!DOCTYPE html>
<html>
<head>
<meta id="meta" name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link href='https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/dist/css/vendor.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.0.9/angular-material.min.css" />
<script type="text/javascript" src="assets/dist/js/vendor.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-material/1.0.9/angular-material.min.js"></script>
<link rel="stylesheet" href="global.css" type="text/css" />
<link href="https://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
<script src="https://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
<script type="text/javascript" src="app/app.module.js"></script>
<script type="text/javascript" src="app/app.route.js"></script>
<script type="text/javascript" src="assets/dist/js/app.min.js"></script>
</head>
<body ng-app="Hive">
<div ui-view class="main_view">
</div>
<ion-tabs class="tabs-icon-top tabs-energized">
<ion-tab title="Home" icon="ion-home" ui-sref="home">
<ion-nav-view name="home-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Discussions" icon="ion-android-contacts" ui-sref="discussions">
<ion-nav-view name="discussions-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Board" icon="ion-ios-list-outline" ui-sref="board">
<ion-nav-view name="list-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Me" icon="ion-android-happy" ui-sref="me">
<ion-nav-view name="profile-tab"></ion-nav-view>
</ion-tab>
</ion-tabs>
</body>
</html>
app.module.js:
(function (angular) {
'use strict';
angular.module('Hive', [
'ionic',
'firebase',
'ngMaterial'
]
);
});
app.route.js:
(function (angular) {
'use strict';
angular.module('Hive')
.config(stateParams)
/* @ngInject */
function stateParams($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: '/home',
templateUrl:'app/components/home/home.html',
controller: 'homeCtrl'
})
.state('me' , {
url:'/me',
templateUrl:'app/components/me/me.html',
controller:'meCtrl'
})
.state('discussions' , {
url:'/discussions',
templateUrl:'app/components/discussions/discussions.html',
controller:'discussionsCtrl'
})
.state('board', {
url:'/board',
templateUrl:'app/components/board/board.html',
controller:'boardCtrl'
})
.state('register', {
url:'/register',
templateUrl:'app/components/register/register.html',
controller:'registerCtrl'
})
$urlRouterProvider.otherwise('/home');
}
})(angular);
Upon running the code, I am facing the following errors:
Error: $injector:nomod
Module Unavailable
Module 'Hive' 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.
Error: $injector:modulerr
Module Error
Failed to instantiate module Hive due to:
Error: [$injector:nomod] http://errors.angularjs.org/1.2.7/$injector/nomod?p0=Hive
at ...
I have been unable to resolve these errors despite extensive debugging. The development environment being used is the online IDE available at . Any assistance in resolving these issues would be greatly appreciated. Thank you!
Edit (ngMaterial Not working ^^):
<head>
<meta id="meta" name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link href='https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/dist/css/vendor.min.css" type="text/css" />
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc2/angular-material.min.css">
<script type="text/javascript" src="assets/dist/js/vendor.min.js"></script>
...
app.module.js:
(function (angular) {
'use strict';
angular.module('Hive', [
'ionic',
'firebase',
'ngMaterial'
]
);
})(angular);