Q:

AngularJS nav active class won't show

I'm Quite new to AngularJS and I try to develop a nav bar, which changes the activeclass. So I tried to make a function in my controller to define the active class.
My html code of the nav:

The controller:

I compiled with grunt and there are no errors/warnings. Every navigation item hasn't the active class. How does this come?

A:

You're not injecting $location in your controller here:
['$scope', function($scope, $location) ...]

Add it to the injection list:
['$scope', '$location', function($scope, $location) ...]

Your syntax for ng-class is fine.

