I made up a ionic project with blank status.
I want to make a controller module ( controllers.js ) apart from root module (app.js), but It not works.
So I’ve tried to debugging on a pure angular project, It hasn’t no problem.
And If they merge a one file, It’s no problem too.
I don’t know why the reason.
The below is my ionic project code.
Please help me.
www/index.html
<html ng-app="radio">
<head>
<link href="css/ionic.app.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="cordova.js"></script>
</head>
<body ng-controller="mainCtrl">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content>
</ion-content>
</ion-pane>
</body>
</html>
www/js/app.js
angular.module('radio', ['ionic', 'radio.controllers'])
.run(function($ionicPlatform) {
$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.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
});
www/js/controllers.js
angular.moudule('radio.controllers', [])
.controller('mainCtrl', ['$scope', function($scope) {}]);
“error message”
Module 'radio.controllers' 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.
Please give me a any tip.