I have an AngularJS application with pages built using Smarty. At the top of the page there is an ng-agg tag parameter, and the ng-agg base templates are compiled, and my .run method of my module is executed, but my controller is not called
Html start
<!DOCTYPE html> <html ng-app="myapp"> ...
$ routeProvider
angular.module('myapp', function($routeProvider, $locationProvider) { $routeProvider .when('/index.php?page=tutorial', {controller: 'MyappTutorial'}) .when('/index.php?page=home', {controller: 'MyappHome'}) .when('/index.php?page=login', {controller: 'MyappLogin'}) })
Textbook controller
var MyappTutorial = function ($scope, $location) { console.log('tutorial'); }
When am I on the index.php page ? page = tutorial My angular template is created and console.log () in my myapp.run() method starts, but the control controller does not start.
How do I debug this. I assume that routeProvider is going wrong, is there a way to check which controller is being used, if any.
I am not getting any errors in my javascript console.
This works in Chrome from a local Ubuntu virtual machine on Mac.
source share