For some reason my $location object doesn't have the path function when calling in my controller.
Someone an idea?
E: here the Controller
erpmApp.controller('dashboardCtrl', ['$scope', '$http', '$parse','$swipe', '$location', '$rootScope', 'Page', 'Data', 'Config', function ($scope, $rootScope, $http, $parse, $swipe, $location, Page, Data, Config) {
Config.setHeadbarStatus(true);
Page.setTitle('ERP-Mobile');
$scope.dashboarddata = null;
$scope.redirect = function(url) {
console.log($location);
};
$scope.loadDashboard = function() {
if($scope.dashboarddata == null) {
Data.getDashboardMenuData().then(function(response){
$scope.dashboarddata = response;
});
}
};
}]);