I've been attempting to organize my angularjs controllers into separate files without success.
Folder Structure:
--public--
--js/controller/resturant.js
--js/master.js
--index.php
Content of master.js
angular.module("rsw",['rsw.controller']);
Content of resturant.js
angular.module('rsw.controller').controller('resturant', ['$scope', '$http', function($scope, $http){
$scope.data="Test"
}]);
Code in index.php
--
<div ng-app="rsw">
<span ng-controller="resturant">
{{ data }}
</span>
</div>
--
UPDATE: I have only included 'master.js' in my index.php file. Do I also need to import 'resturant.js'?