$routeParams generating Unknown Provider

695 views Asked by At

This is my code inside a Mean.IO package. The controller takes in a number from the URL and then passes it to a factory.

This bit of code is giving me and Unkown Provider error for $routeParams.

angular.module('mean.rotor-tablet').controller('taskListController',
  function($scope,$location,$routeParams,dataFactory){
console.log("SAD");
$scope.partid=$routeParams.id;
$scope.part=dataFactory.getPart($scope.partid)
$scope.tasklist=dataFactory.getTaskList($scope.partid)

$scope.goToTask=function (task_index){
    $location.path('task/'+$scope.partid+'/'+task_index);
  }
})

The exact same code was working fine on an AngularJS application I was running on the LAMP stack. When I added this to Mean IO however I got this error. (in case it's important I created a new package and this is in a file called controllers.js in the controllers folder)

PS I'm a n00b to Mean.IO. The reason I chose to mention Mean.IO specifically is because the problem seems endemic to it and not to AngularJS in general

0

There are 0 answers