I want to make a controller module in other javascript file

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.


<html ng-app="radio">
<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>
<body ng-controller="mainCtrl">
  <ion-header-bar class="bar-stable">
    <h1 class="title">Ionic Blank Starter</h1>


 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) {
    if(window.StatusBar) {


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.

Have you include the controllers.js in the Html

<script src="js/controllers.js"></script>

first, thanks for your reply.
but yes… that can see in my code.

Hmm, not sure whats going on, but its working for me.

I’ve remove controller.js and applied your code on one app.js file, but I saw the same error.
So, I assumed the problem is other thing.
Oh, I’ve detected misspelling, "moudule"
Now, everything is works.
I’m very appreciate your assist!