In app.js I have:
(function(){
var app = angular.module("myApp", []);
})();
in process.js which is included after app.js I have:
(function(){
app.controller('ProcessController', ['$http', function($http){
this.something = "Test"
}]);
});
and in my HTML file I have a div
<html class="no-js" lang="en" ng-app="myApp">
...
<div class="row" ng-controller="ProcessController">
This is throwing an error in my console:
Error: [ng:areq] Argument 'ProcessController' is not a function, got undefined
I'm pretty new to angular and have never used multiple files like this before. What am I doing wrong?
var app = angular.module("myApp");in the process.js before theapp.controller(...). - Shaohaoappbe available from the file included before hand? The error isn't complaining thatappdoesn't exist. - Deekor