I have diferents controllers in my app.
player.php:
<html ng-app="decibels-interactive" lang="en">
<body ng-controller="InteractiveController as interactCtrl">
player.php have its respective player.js with its .controller running correctly.
Now, I have the menu bar in menu.php, where I use in player.php document, imported with:
<html ng-app="decibels-interactive" lang="en">
<body ng-controller="InteractiveController as interactCtrl">
<?php include('includes/menu.php'); ?>
//here some html code
</body>
</html>
Now, I am trying to create a menu.js without success. I get the next error:
Error: [ng:areq] http://errors.angularjs.org/1.2.25/ng/areq?p0=menu&p1=not%20a%20function%2C%20got%20undefined...
menu.php
<div class="navbar-fixed" ng-controller="menu2">
//some html code
</div>
menu.js:
app.controller('menu2', function($scope) {
$scope.content = '';
});
What am I doing wrong?
Thank you!
InteractiveController
andmenu2