Using AngularJS with Scala Play, I\'m getting this error.
Error: Argument \'MainCtrl\' is not a function, got undefined
I\'m try
Уmed's second point was my pitfall but just for the record, maybe it's helping someone somewhere:
I had the same problem and just before I went nuts I discovered that I had forgotten to include my controller script.
As my app is based on ASP.Net MVC I decided to keep myself sane by inserting the following snippet in my App_Start/BundleConfig.cs
bundles.Add(new ScriptBundle("~/app").Include(
"~/app/app.js",
"~/app/controllers/*.js",
"~/app/services/*.js" ));
and in Layout.cshtml
...
@Scripts.Render("~/app")
...
Now I won't have to think about including the files manually ever again. In hindsight I really should have done this when setting up the project...