Buksy Buksy - 1 year ago 90
AngularJS Question

Angular, what dependency is missing

I'm learning angular.js and have all libraries linked from CDNs.
When I try to use

I get this error:

Referee.config(["$locationProvider", "$routeProvider"],
function config($locationProvider, $routeProvider) {
// ...

angular.js:38Uncaught Error: [$injector:modulerr]

From what I've seen an that error page I need to include
. So I linked
after my
but it doesn't work and I still get the same error. What do I do wrong?

Here is jsbin

Answer Source

Seems like the array syntax is wrong; close the square bracket towards the end:

Referee.config(["$locationProvider", "$routeProvider", 
    function config($locationProvider, $routeProvider) {
        // ...

Why array notation? - Reason for using array notation when defining AngularJS Controller